Populate form fields on select
Auto-filling a form for a chosen record
Use this pattern when a picker should load a selected record into a form.
The picker stores the selected row ID in app state, and the form reads that value back.
Build the picker
- Add a Form
- Add a Data provider
- Add an Options picker
- Set the picker to use the data provider
- Set the picker value to the row
_id - Save the selected
_idinto app state on change
Build the detail form
- Add a Form block
- Set the form type to
View - Point it at the same table
- Bind the Row ID to the saved state value
Why this works
The picker chooses the record and the form reads the matching row directly from the table.
Try it out
Updated 4 months ago
Did this page help you?