Subform Field Guide
The subform form field type provides a method to create multiple fields. These can be reused and repeated. For example, you can use this field to store FAQs, user addresses. In the database, the data is stored as JSON.
Field Settings
Form Source: The subform field requires additional fields. You can either enter the XML file path that defines the fields or define the fields in the settings.
Multiple: If enabled, the field will become repeatable.
Form Layout: Choose the layout for the subform field. If Multiple is enabled, then select Repeatable or Repeatable Table.
Minimum Rows: The minimum number of records user must enter.
Maximum Rows: The maximum number of records the user can enter.
Fields: Here, you can define the fields. This will work when the form source is empty.
How to Add Fields to Subform?
Name: Enter the name of the input field. This will also be used as label.
Type: Select the type of field input.
Settings: Enter additional settings as key:value pairs for the field, separated by semicolon. For example, label:Title;hint:Enter Title
Form Source
The TF Library provides some ready-to-use sub forms. So, instead of defining the fields, you can directly use these. Just enter one of the following paths in the Form Source:
- libraries/techfry/forms/content/accordion.xml
- libraries/techfry/forms/content/card.xml
- libraries/techfry/forms/content/image.xml
- libraries/techfry/forms/content/list.xml
- libraries/techfry/forms/content/tabs.xml
- libraries/techfry/forms/content/text.xml