FormWork documentation
Using as Options Source
Load select, radio, and multiselect choices from a data table.
Select, radio, and multiselect fields can load choices from a reference instead of maintaining a manual list. A data table is the usual source when choices are shared, filtered, or updated over time.
Connect a Field
- Select a select, radio, or multiselect field in the form builder.
- Open its options editor and choose Data Source instead of Manual Options.
- In Data Source, use the reference picker to select the table’s rows.
- In Option Label Field, select the cell respondents should see.
For a products table, select the table’s Rows as the data source, then choose a readable cell such as Name for the option label. The builder creates the required references for you.
Labels and Stored Values
For a row-based source:
- Option Label Field controls the text shown to the respondent.
- The saved answer value is the selected row’s ID.
- There is no separate configurable value column.
This means a product can be renamed without changing its identity in entries that already selected it. To read another cell later, filter the table by that saved row ID:
data_table:<products-table-id>.rows[id={entry:current.answers.product}][0].cells.price
Filter the Available Rows
Filters belong in source_reference. Criteria for table cells use the cells. prefix.
Only active categories:
data_table:<categories-table-id>.rows[cells.active=true]
Products that match another answer:
data_table:<products-table-id>.rows[cells.category_id={entry:current.answers.category}]
The nested entry reference uses single braces. The reference picker is the safest way to select the source and build its path.
Common operators include:
| Syntax | Meaning |
|---|---|
[cells.active=true] | Equals |
[cells.status:neq=archived] | Does not equal |
[cells.price:gte=10] | Greater than or equal |
[cells.name:contains=Pro] | Contains text |
[cells.code:in=A,B,C] | In a list |
[cells.email:notempty] | Is not empty |
Combine criteria with &, for example:
data_table:<products-table-id>.rows[cells.active=true&cells.price:lte=100]
Simple-Value Sources
Options can also come from a reference that already resolves to a simple list, such as entry:current.answers.tags. In that case, each value is used directly and the builder does not ask for a separate option label field.
Dependent Choices
To build a country and region pair:
- Source the country field from the countries table.
- Source the region field from the regions table.
- Filter the region rows by the country row ID saved in the first field.
data_table:<regions-table-id>.rows[cells.country_id={entry:current.answers.country}]
When the source answer changes, FormWork can load the matching choices for the dependent field.
Troubleshooting
If choices are missing or labels look wrong:
- Confirm the source points to
.rows, not directly to the table. - Confirm table-cell filters use
cells.<column-id>. - Confirm the label reference is rooted under the same row collection, such as
.rows.cells.name. - Check that the filter compares compatible values. A selected table option stores a row ID, not the label text or another cell.
- Reload the form after changing table data, then test with a new or draft entry.
Good Practices
- Keep the row ID as the stable value and use a human-readable cell as the label.
- Filter out inactive rows instead of deleting rows that old entries still reference.
- Use immutable codes in a dedicated cell when workflows need a business identifier separate from the row ID.
- Test dependent choices with empty, changed, and previously saved parent values.