Auto Populate Forms
View the video below to learn how to auto-populate the fields for your form:
You can auto-populate a form field by adding a query string to the url. You will need to URL encode any special characters. For example, to populate a first and last name,
Add this to the end of your form URL:
?first_name=John&last_name=Smith
You can use the name attribute of any field. It converts the name you give it to all lowercase and replaces spaces with underscores. If you are having trouble identifying the field, you could also look at the HTML source code to get the name of the element you want to populate.
You can populate other field types as well. You just need to pass the name=value.
In the case of fields with choices (e.g., drop downs, radio buttons, checkboxes) you need to pass the value that is set for a given choice.
Drop downs and Radio Buttons work the same. Use the value you setup when creating your choices and send it as the value. For example, with a field choice value of ALUM
?campaign_field_1=ALUM
Checkboxes work the same but their naming scheme is different since each checkbox is its own value. The name has to be in the format name[value]=value. This will check the box. Here is an example with a field choice value of ALUM.
?campaign_field_2[ALUM]=ALUM
Default Fields
Here are the HTML element names for the default fields:
First Name = first_name
Last Name = last_name
Email = email
Phone = phone
Address Line 1 = address_line1
Address Line 2 = address_line2
City = city
State = state (this is the 2 character code, for example, FL for Florida)
Zip Code = zip_code
Country = country (this is the 2 character code, for example, US for the United States)
For example this address:
123 Main Street New York, NY 12345 United States
Add this to the end of the URL:
?address_line1=123%20Main%20Street&city=New%20York&state=NY&zip_code=12345&country=US