Designing Controllable Tables
The XForms form template designer now supports tables, and it’s really easy to create them. Here’s a summary of the controls you can use when building tables:
- Add columns, which supports the following data types:
- User (read-only)
- Add rows
- Lock columns and/or rows
- Default values to load into any cell
- Move columns to left or to the right
- Move rows up or down
- Allow a field user to add more rows or not
- Clone a row
Here’s a couple of helpful screenshots
And here’s an animated gif of me editing a table.
Once you create your table, then just save the form and it’s immediately available to your field users (once you publish and activate the form). If you want to see the changes you made before publishing, launch the mobile app (or web version of the mobile app) and load the form. Make sure you tap on the menu icon and then on “Refresh Data” before loading the form to view the changes. Also note that any forms in draft mode will NOT be visible to your field teams…they will only be visible to users with admin access, and they will appear with a pink background color on the form template selection screen. For more info about this (and info about form template version control), click here: https://jamesy33.sg-host.com//version-control-form-templates/
What’s next for tables (summer 2019)
In a few months time, the table control within XForms will be even more powerful, as we add the following features:
- Ability to hide a column in the grid (table) view, but display all the columns in detail view popup. This will allow you to suppress non-essential columns on the grid view but allow field teams to still add values to those columns after tapping on a row in the table.
- A footer that will let you SUM the total of all the rows of a numeric column.
- And eventually tables will also support calculated columns, where you will be able to create a column that will automatically generate numeric values based on other numeric columns.
- Background colors for columns, rows, and cells
The above features are not developed yet, but are forthcoming in a few months.