The Table is a container that can hold other tools such as text, lookups, numerics, and calculations. A table is similar to a Layout grid, except that in a Table the contents of each row are dependent on a set series of columns (in a grid, the content of any cell can be random). Tables enable spreadsheet-like functionality within your form, as they allow you to create invoices, electronic timesheets, and other cell-like structures.
The example above is a Table that functions like an invoice. It incorporates lookups, and uses a calculation to multiply Qty by Cost to calculate Line Amount for each item purchased.
Table label: Caption text for the table container. The maximum number of characters is 500, including spaces.
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).
Number of rows: This defines the number of rows in the table. Note that, while it may seem a good idea to max out the number of rows, this could unnecessarily impact the size of your form and ultimately its performance. Consider using a Variable row number, described below.
Variable row number: This allows you to dynamically set the number of rows in your form. For example, suppose your table needs a number of rows equivalent 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 row number. Note the following:
Dynamically Add Rows- this setting when turned on will change how the table structure is handled. With this setting on the table will display the amount of the rows specified but then will also dynamically add a row at the end of the table once the last row has a value in it. Without this setting if the table has 5 rows once all 5 rows are filled out you cant add anymore but if this setting is checked it will allow you to add as many rows as needed.
Required rows: The required rows setting in tables is used to make an entire row required if one column is entered. This makes it so if a user starts filling out a row they cannot submit until the entire row is completed. This setting is not the same as setting a field in your table to required. Setting a field to required makes every row for that column required this setting only makes the corresponding columns in a given row required when one field is entered.
You must place the source tool above Table tool in the form builder.
If you choose this setting, then its value must be less than or equal to the Number of rows value. For example, if the Number of rows value is 5, and the mobile user enters a Numeric value as the Variable row number, 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 rows must be answered: If the Variable row number option is selected, this property specifies that all of the rows must be entered by the mobile user.
Display row number: If the Variable row number option is selected, select this property to add a first column to the table, which will display row numbers for each row.
Vertical Captions: this setting allows users to turn their captions vertical instead of horizontal. This setting is great for when table columns only need a small value entered and the user wants to fit a lot of columns one on screen. If a user has 15 columns that are horizontal they will not fit on 100% of the screen nicely but if you turn the captions vertical more columns can fit nicely in 100% of the screen.
Verify Duplicates - this setting when turned on will evaluate each answer in a column and display an error message if a duplicate value is entered. If "Allow Duplicate" is selected it will allow the answer in the table but still show a message notifing the user that they entered a duplicate value. If this the allow duplicate setting is off it will clear the answer until a non duplicate is entered.
Use Checklist: This is a powerful feature that can save you a lot of time building a form. To use this feature, you must already have a data source, which will be used to create a list of entries in the table. (You can add a data source by clicking on the Lookup Data tab, and then uploading a file or link to a form.)
Then add a Data Lookup tool as your first element in the table. The table will automatically expand the number of rows in your table, one per item from the data source.
Why is this valuable? Suppose you have 20 questions to ask, and the additional data you need to enter for each question is the same. If you used separate tools to create these 20 questions plus additional data within your table, you would have to create dozens or even hundreds of elements in your form. By using the Use checklist feature, the table rows are created automatically based on the number of items in the data lookup. This dramatically shortens your form, and reduces the time you spend building it.
Fit to screen: This feature provides a level of device responsiveness as it attempts to force your container elements to fit within the available width of your device's screen. We say "attempts" because certain tools have minimum widths, and if a grid contained two tools with minimum widths that together were larger than your screen width, then the Fit to screen parameter would be overwritten. Otherwise, the table will recalibrate the amount of screen real estate given to each element, based on the rules below. If Fit to screen is not selected, then the table is allowed to stretch beyond the right border of your device's screen, which may be preferable if your table contains a large number of elements.
Equally space columns: Attempts to divide the screen width of your device by the number of columns in your table.
Use caption length: This setting will attempt to use your tool's caption to set the width of the column. So a caption of "Total" (5 characters in length) would be given more screen width then "Qty" (3 characters in length).
Adjust column width: (The Fit to screen checkbox must be selected in order to use this option.) This option gives you the most control over how columns widths are set. When you select this option, a column setting field will appear in which you must enter values (separated by vertical lines) that equal 100%. For example, if you had a 3-column table and wanted it to fit to screen with the first column equal to 50% of the screen, and the other two columns set to 25% apiece, you would enter the following in the column setting field: 50|25|25.
You can adjust the table width so that it widens past the width of the mobile device's screen, thus allowing you to control the width of each column without constraining it to fit into the screen's built-in width. By selecting a width from the drop-down list (100% to 300%), the table will retain its proportional widths for each column, but the table will stretch to the selected width (e.g., 200%) of the mobile device's screen. Now, the user can now scroll horizontally to see the entire table, and data is less likely to wrap within table cells. See this document for more information on adjusting table width.
Expand table if screen smaller than: This setting specifies the screen size (measured in inches diagonally) at which the table will expand.
Text Size- changes the size of the text for each cell in the table. Medium is the default but the text size can be lowered to small or highered to large.
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: This parameter is used to remove the space just before and just after the tool. By removing space two elements can be made to appear linked or as a single element.
Shaded: While you caption might be dark blue with white text, you might want the rows of your table to be light blue with black text. Use this option to set how shading is used in the body of your table. By shading every other row it is very easy to create custom invoices that rival any accounting package. The first image in this section depicts this option.
See Appearances for additional details.
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.