URL injection prefill
It can be useful to populate some questions, particularly hidden fields, with the value of URL parameters. Use cases for this include populating easting and northing fields with data obtained prior to starting the form, or passing a CXM case reference to a form so that the case can be modified.
To use URL parameter injection on your form:
In your form, click Advanced > Prefills in the top navigation bar (under the the form title).
Click Add Prefill. The create interface will open.
Select the question to be prefilled.
Select A URL parameter as the value of the prefill.
Specify a key to pass the parameter under e.g. 'reference'
The prefill will be created and added to the list.
Access the form with
?reference=123 on the end of the URL. You will see 123 appear in the question you added the prefill to.
- You can prefill a question on any page with a URL parameter.
- All parameters must be passed in the URL when the form is first accessed, regardless of which page the prefilled question is on.
- Received Forms records the injected parameters for each submission, under the first entry in the Logs tab