Subform
A subform is a reusable form fragment. It is not shown in the tile view and cannot be submitted directly. Instead it is referenced by:
- A
listfield — opens the subform as a drilldown editor for each row - A
yamlfield with thesubformproperty — opens the subform as a drilldown editor for a single object
A reusable form fragment used as the per-row editor of a list field, or as the single-object editor of a yaml field with the subform property.
Subforms are not shown in the tile view and cannot be submitted directly.
They share the same field types and validation rules as regular forms.
Address subform
forms:
- name: Address
type: subform
fields:
- name: street
type: text
label: Street
required: true
- name: city
type: text
label: City
required: true
- name: country
type: text
label: Country
required: true
- name: My Main Form
type: ansible
playbook: site.yml
roles:
- Public
fields:
- name: addresses
type: list
label: Addresses
subform: AddressProperties
Subforms have no type-specific properties. They use only the common form properties: name, description, help, type, and fields.
Execution properties (playbook, template, roles, inventory, etc.) are not applicable to subforms — a subform is never submitted directly.