Description
Support pre-filling form fields using URL parameters with XPath syntax, such as &d[/data/uuid]=foo, to match the functionality already available in Enketo. This feature would allow seamless pre-population of form fields (e.g., a text field named uuid) via URL query parameters.
For now, we will match the Enketo API:
- a d dictionary query parameter using bracket notation (e.g. d[/data/foo])
- each dictionary key is the full XPath path to the question to populate
- only element paths in the primary instance can be set this way
Defaults should replace any literal values in the primary instance and be set before any calculation, preload or setvalue actions are triggered. The odk-instance-first-load event should fire after.
Defaults should be ignored when an existing submission is loaded.
Form:
pre-fill using url parameter.xlsx
Checklist
- Does it need UI/UX design?
- Does it need API design?
- Does it need design around state flow?
- Does it need a test plan?
User Stories
As a project manager I want to distribute a link to a form that autofills specific fields so that the user doesn't need to re-enter known information.
Design
- Figma: [Insert URL]
- Design Docs: [Insert URL]
Dependencies
Additional Notes
Related Issues
Description
Support pre-filling form fields using URL parameters with XPath syntax, such as
&d[/data/uuid]=foo, to match the functionality already available in Enketo. This feature would allow seamless pre-population of form fields (e.g., a text field named uuid) via URL query parameters.For now, we will match the Enketo API:
Defaults should replace any literal values in the primary instance and be set before any
calculation,preloadorsetvalueactions are triggered. Theodk-instance-first-loadevent should fire after.Defaults should be ignored when an existing submission is loaded.
Form:
pre-fill using url parameter.xlsx
Checklist
User Stories
As a project manager I want to distribute a link to a form that autofills specific fields so that the user doesn't need to re-enter known information.
Design
Dependencies
Additional Notes
Related Issues