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 |
---|---|---|
Fred | Firefighter | |
Alternatively you might print the same section of the form a number of times:
Authorization #1 | |
---|---|
Name | |
Signature |
Authorization #2 | |
---|---|
Name | |
Signature |
Master/Detail
AsdeqForms has a powerful control to use in these situations: the Master/Detail.
The control is in two parts:
Master
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.
Detail
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 icon
next to the entries on the Master page.
Adding a Master/Detail to a Form
The Master/Detail control can be found in the "More" section of the AsdeqForm Editor
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
- Master/Detail
- Date
- Single Line
- Autocomplete
- Address
Configuring a Master/Detail
The following properties can be used to customise the Master/Detail
quickAddReset | If true, resets and reinitialises the quickAdd controls whenever a new entry is added. |
quickAddButtonText | When used with the quickAddDetail mode, sets the text for the button which quickly adds new detail entries. |
menuEditEnabled | If true, adds an 'Edit' option to the context menu of a master/detail which allows for editing the selected entry. |
menuDuplicateEnabled | If true, adds a 'Duplicate' option to the context menu of a master/detail which creates an exact copy of the selected entry. |
menuDeleteEnabled | 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
Data Format
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.