Concepts
Forms
Capture forms for a perspective: fields and web parts in the zones of a layout.
A form is a capture form for one perspective: that perspective's fields, and web parts, laid out in the zones of a layout. When someone opens an entity in the portal, its perspectives are offered at the top and, under each, that perspective's forms.
Layouts and zones
A form has a layout: rows of zones, each zone a share of its row's width. Each zone holds an ordered list of components. The built-in layouts are listed in Layouts: one, two or three columns, a header over two columns, two over three, main and sidebar, and so on. A form's perspective and layout are chosen when it's made and can't change afterwards.
Components
Each component is a field or a web part:
| Kind | Settings |
|---|---|
| A field of the perspective (at most once a form) | label, hint, placeholder, readOnly |
| Heading | text, and level (large or small) |
| Text | A paragraph of explanation |
| Divider | A line between groups of fields |
| Sub-grid, lookup | See below |
| A web part from an installed package | Any JSON object; the part checks it against its own schema |
Relationships on a form
Each relationship of the form's perspective is offered by the side the perspective is on:
| Part | When | Shows | Settings |
|---|---|---|---|
| Sub-grid | The perspective is referred to (Customer in Customer → Orders) | A table of the entities that refer to this one, with a view's columns, filter and order | title, relationship, view |
| Lookup | The perspective holds the reference field (Order) | A search box and drop-down that picks the entity it refers to, listing and searching a view | label, hint, placeholder, readOnly, relationship, view |
Both need a view of the perspective at the other end: for Customer → Orders, a view of Order on the Customer form. A lookup sets the relationship's reference field, so a form has at most one lookup per relationship, and not the reference field as well. In a one-to-one relationship, the end with the reference field counts as the many side.
Where forms are stored
Each form is a JSON file stored as a resource, forms/<name>.json, next to an index of
every form and its perspective. Only the forms API writes there, but the files can be read like any resource.
After a schema change
As with views, a form reports its problems against the current schema whenever it's read: a field that's no longer in its perspective, or a sub-grid whose view has been deleted.
Permissions
Seeing a form needs Read (or Manage) on its perspective; making or changing one needs Manage. Whether someone can edit through a form is decided by Write on the perspective: without it the portal shows the form read-only.
In the portal
A perspective with no forms gets All fields: each of its fields, in order, in one column. See The entity editor.