FormΒΆ
-
/libs/granite/ui/components/foundation/layouts/form
The layout to render the form.
It has the following content structure at the layout resource:
- granite:LayoutsForm
-
modestring
- default
- edit
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.
-
stylestring
- vertical
- vertical
- aligned
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.
-
modestring
The body of the form is specified using ItemDataSource.
Example:
+ myform - sling:resourceType = "granite/ui/components/foundation/container" + layout - sling:resourceType = "granite/ui/components/foundation/layouts/form" + items + item1 + item2