Form ==== .. granite:servercomponent:: /libs/granite/ui/components/foundation/layouts/form :layout: :deprecated: The layout to render the form. It has the following content structure at the layout resource: .. gnd:gnd:: [granite:LayoutsForm] /** * The mode of the form. * * default * The form is shown in readonly mode, where the fields are optimized for reading, instead of editing. * edit * The form is shown in edit mode, where the fields are ready to handle user inputs. */ - mode (String) < 'default', 'edit' /** * The layout style of the form. * * vertical * The form fields (and their labels) are laid out in vertical manner. * aligned * The each form field is laid out side-by-side with its label. */ - style (String) = 'vertical' < 'vertical', 'aligned' The body of the form is specified using :ref:`ItemDataSource `. Example:: + myform - sling:resourceType = "granite/ui/components/foundation/container" + layout - sling:resourceType = "granite/ui/components/foundation/layouts/form" + items + item1 + item2