A Repeatable is a special type of container that repeats itself within the form as many times as the mobile user instructs it to. The repeatable can contain various tools, inputs, etc., allowing the user to collect multiple sets of the same information, all in one form. For example, suppose you wanted to use a form to capture contact information for people that attend your event. Since you don't know how many people will show up at the door, you can use a repeatable to capture the information, one attendee at a time.
The animated image below shows a form containing such a repeatable. After finishing entering contact information for the first attendee, the user taps the button that tells them to add another attendee, which creates a new repeatable section for the second attendee:
The maximum number of loops (repeated sections) can be specified when building the form, or it can be specified by the mobile user when filling out a form (in a prior question).
Note that repeatable sections can be nested within one another, providing a very efficient method for form users to enter long lists of information. For example, you can create nested repeatables that collect an inventory of part numbers (repeatable inner loop) located on a series of shelving units (outer loop). If you do create nested loops, it is strongly suggested that you experiment with the Section label property in context with the Repeat transition text that appears on the repeat button within your mobile form. Preview and test your form before deploying, so that it is clear to the mobile user how they need to enter information within the form.
Section label: The caption that appears above the repeatable section.
Data Name: Because this is a required field, doForms will default the Data name to match the Caption or Label. If these are blank, doForms will generate a generic Data name name with a sequential number (such as "untitled10"). Since it is used throughout the system, it is recommended that you enter a descriptive Data name that is easily identifiable. Nondescript Data names are difficult to find and select at a later time (e.g., when performing a calculation).
Max repeats: The maximum number of times that the form user can tap the repeat button and create a new repeatable section on the form (i.e., a loop). This number must be between 1 and 20 (default value is 10). Note that mobile users will be prompted to tap a button before each loop if they wish to continue, therefore the actual number of loops is determined by the mobile user.
Variable repeats: This allows you to dynamically set the number of repeatable loops (up to the Max repeats) in your form. For example, suppose you need a number of loops equal to the number of smoke detectors in a home. You could include in your form a Numeric tool named "Number of smoke detectors," and set this field as the value source for the variable repeats. Note the following:
You must place the source tool above the Repeatable tool in the form builder.
If you choose this setting, then its value must be less than or equal to the Max repeats value. For example, if the Max repeats value is 5, and the mobile user enters a Numeric value as the Variable repeats, then the Numeric value must be less than or equal to 5 (the form user would see an error message if the value is greater than 5).
Our example setting is shown below:
All repeats must be answered: If Variable repeats is selected, this property specifies that all of the repeats must be entered by the mobile user.
Display repeat count: If Variable repeats is selected, this property determines whether a simple number will appear in parentheses following the repeatable label, like this: Section (1), or a simple number with repeat count will appear, like this: Section (1/5).
Allow Delete: This setting when turned on allows users to delete previous repeats from the array. If this setting is turned off the user will not be able to delete a repeat once they have added it.
Replace Header: This setting when turned on allows users to replace the header of the repeat with a field value. By default the repeatable will show the caption text with a number to specify which repeat is which but this setting allows the header to change for each repeat.
Automatically collapse repeat- this setting when turned on will automatically collapse the previous repeat when a new repeat is added. Without this setting every repeat will be opened for the user to see all the quesitons.
Appearance: doForms allows you to set a default set of appearance parameters. This eliminates the need for you to have to set colors and other parameters each time you add an element to your form. You can however override the default settings for any tool by simply picking the Custom option. You can also edit the default by clicking on the edit defaults option.
See Styling your form for more details.
Justification: Allows you to apply text justification settings to certain elements of the tool. Choose the appropriate radio button for the Caption field as follows:
L: Left-justifies the text.
C: Center-justifies the text.
R: Right-justifies the text.
Remove space: Enables you to remove the space before and/or after the grid.
Repeat transition text: The text of the repeat button, which is displayed to the form user at the end of each repeatable loop (300 characters maximum.)
Only display this question if
This is a very powerful option as it allows you to hide form elements, only exposing them if the answer to a question in your form meets the criteria you have set. Being able to hide fields unless they are needed makes form more user friendly. For example, if you have a Choose One question with the answers Yes and No, then you can say "Only display this form element if" the answer to the Choose One is "equal" to "Yes." You can combine criteria with other criteria, thus creating complex criteria for showing/hiding form elements.
The Repeatable tool supports the following tools:
- Action Button
- Choose One
- Data Lookup
- GPS location
- Score by Category
- Select Multiple
- Layout Grids - *Note* When using a repeatable container doForms replicates the fields inthe container "X" number of times that the user enters. Having large layout containers or multiple layout containers inside of 1 repeatable may cause a performance issue.