What is a Master/Detail?
A common form requirement is to enter a list of items, especially items that comprise multiple fields. On a paper form you might print a table with several blank rows. It's up to the person filling in the form how many rows they use.
|Attendee||Date of Registration||Occupation|
Alternatively you might print the same section of the form a number of times:
AsdeqForms has a powerful control to use in these situations: the Master/Detail.
The control is in two parts:
When you add a the control to your form you first see the Master, which allows you to add entries to your form and shows the list of items in a Summary Table.
The Detail is a separate screen where you can view and edit the fields for a single item. access the Details page using the cog iconnext to the entries on the Master page.
Adding a Master/Detail to a Form
Simply drag and drop the Master/Detail control onto your form. Once you have added the Master/Detail to a form you can drag and drop the required fields into the Master/Detail panel
In this example the following controls are added
- Single Line
Configuring a Master/Detail
The following properties can be used to customise the Master/Detail
|If true, resets and reinitialises the quickAdd controls whenever a new entry is added.|
|When used with the quickAddDetail mode, sets the text for the button which quickly adds new detail entries.|
|If true, adds an 'Edit' option to the context menu of a master/detail which allows for editing the selected entry.|
If true, adds a 'Duplicate' option to the context menu of a master/detail which creates an exact copy of the selected entry.
|If true, adds a 'Delete' option to the context menu of a master/detail which removes the selected entry.|
Configuring the Master Summary Table
When you add items to the the Master/Detail they get added to the Master page Summary Table. The Summary Table can be configured by editing the Detailed Description.
The summary table detailed description can be configure with the following options
- The value of the first control
- The summary table will have a single column with data from the first control in the Master/Detail
- One or more control values arranged in columns
- Summary table columns can be ordered by dragging and dropping the list items
- A custom HTML template
- For example, using the Data Binding & Expression Builder
The output of Master Details is stored inside form submissions in a way that allows them to handle arbitrary numbers of entries for different types of details. It varies depending on whether it is XML or JSON. See the Master Detail section of Form Submissions for examples.