-
Notifications
You must be signed in to change notification settings - Fork 1
Usage with webform
To prepopulate a text field in a webform called "name", the name attribute of that field would be submitted[name]
. So the URL would be:
https://example.com/contact?edit[submitted][name]=John%20Doe
To pre-select a radio option for a field with a name attribute of submitted[who_is_your_message_for]
, the URL could be:
https://example.com/contact?edit[submitted][who_is_your_message_for][2]=2
The [submitted]
bit is from the name attribute of each of the radio buttons in the group: name="submitted[who_is_your_message_for]"
but it has to go into square brackets. [2]
and =2
refer to the value attribute of the individual radio button: value="2"
.
To pre-select a dropdown for a field with a name attribute of submitted[favorite_color]
, the URL could be:
https://example.com/contact?edit[submitted][favorite_color]=red
Where "red" is the key value for a label of "Red"