How to Autofill a Motion 2 Form Field Using a URL Parameter

The URL param autocompletion setting enables users to have form fields pre-fill through the use of a URL. This pre-filled data can be applied for hidden form fields as well.

Use Case Examples:

  • A potential lead wants to fill out an Inquiry Form and you want the Job Title of "Teacher" to automatically be filled in.
  • An event is held and you want the event name filled in automatically on the Event Form, but to be hidden from the person filling the form out.

 


How to Configure:


  • Right-click the Task (Example: Contact Form) and click Manage Form Fields.

  • Double click (or right click, then left click Edit) to edit the specific Entity Field that you want data automatically pulled in (Example: Job Title).

  • Left-click the checkbox next to URL Autocomplete, which says “Check this to enable URL param autocompletion”.

  • A new text box should appear that says “Param Name:”.

  • Enter any name you would like here. It is recommended to keep it short, as it will be pulled into the URL in order to identify the data from this specific entity field (Example: jobtitle).

  • Left-click Save & Close.



Example of Motion 2 form URL parameter setting



If the entity field connects to a data group:

  • After entering the param name (example: jobtitle), you will need to use the data group ID to reference which title from the data group list to pull in (example: “Teacher” data group ID is 1).

    • To find a data group ID, go to Data Groups and select the data group list you want to use (example: Job Title).

    • If the ID column is already displayed, refer to the number (example: 1)  that horizontally aligns with the title (example: Teacher) you want to automatically pull in.
    • If the ID column is not already displayed, on the far right, left-click the chevron down icon, hover over "Columns" and select "ID". This will now display the ID column. Refer to the instructions directly above to proceed.



Data Group ID column display example

  • At the end of the form URL, type ? and then type the param name, followed by =, and then type the ID of the specific title from the data group.


If the entity field is a text field:


Single Word

  • At the end of the form URL, type ? and then type the param name (example: jobtitle), followed by =, and then type the specific text you want to appear in the textbox on the form (example: Teacher).


Multiple Words

  • At the end of the form URL, type ? and then type the param name (example: jobtitle), followed by =, and then the specific text you want to appear in the textbox on the form. Write out the text without any spaces, but type %20 in between each word instead. (example: Elementary%20School%20Teacher).


Modified on Mon, 18 Sep 2023 at 11:56 AM

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Make sure these features are added to your Site Stacker installation by learning how to run updates here!