Passing Contacts Fields into Web form Hosted on our Website

As the topic name.
We are sending an email to contacts in our campaign that has a link to our Infusionsoft Web Form that is hosted on our site.

Since they are in our system and we already have their name and Email we don’t want them to have to fill it out again on the new form. So how do we pass that information from the email in the campaign builder through the link to our web form hosted on our page?

Thank you.

You can build a URL with very specific formatting that will link to a webform with merge fields on the URL to pre-populate the webform. If you want details on this - just reply and I’ll drop it into the thread.

You can also use a third-party tool that simplifies the process - check out the Novak Solutions tool for this here: https://pages.novaksolutions.com/autopopulate-webform

2 Likes

Yes please,

Thank you Jordan that just what we need.
Please toss me that URL and I’ll get our landing page squared away.

I do, let me know what needs to be done.

This will work for any Infusionsoft hosted webform, and it should work if you are using the javascript embed code. If you are using the HTML embed code, then you’ll have to have someone add javascript code to your website to pull the data from the URL and populate the form.

Let’s say you want to load the contact’s first name, last name, and email address, plus a custom field called “Role”.
You need the API field names for each of those fields, and you build them onto the end of the URL in what is called a GET request (which means that you put contact data right onto the URL in field=value pairs). Here’s a quick example:

https://ii130.infusionsoft.com/app/form/948ef8cebbfcabeb95396349eedf278e?inf_field_FirstName=Bob&inf_field_LastName=Doe&inf_field_Email=bob.doe@example.com&inf_custom_Role=TeamLead

Regular fields are added in as “inf_field_FIELDNAME” and custom fields are added as “inf_custom_FIELDNAME”

2 Likes

That makes sense but It does lead me to two more questions.

If the contact is going from an email in our campaign sequence to the
landing page hosted on our site, (and its HTML) I obviously can’t use the
link as you gave in the example because that would mean everyone who passes
through who clicks the link would be Bob right?

So I would leave each one blank? Except for fields that I want everyone to
get in that campaign.
Like if I wanted everyone who went to the next form to have Team Lead role.

What would I need to tell our developer so that he would understand how to add
java-script code to your website to pull the data from the URL and populate
the form.

@Shane_Dutra, the values you see in the example that @Jordan_Novak gave will be populated by the form submit button getting clicked and will be based on the values in the form fields at the time it’s submitted. The important take away is that the parameter names are correct (eg inf_field_FirstName…and so on)

https://ii130.infusionsoft.com/app/form/948ef8cebbfcabeb95396349eedf278e?inf_field_FirstName&inf_field_LastName&inf_field_Email

So if I wanted to pass contact information. (Whoever clicked the link) to the next form this is how it would need to look? That was my question. So I don’t know why he gave an example with existing contact information in it…

What would I need to tell our developer so that he would understand how to add
java-script code to your website to pull the data from the URL and populate
the form.

You don’t have to do the adding. Under the form settings there is a checkbox to allow passing of contact information. It will happen automatically from there. The developer just needs to know the names to use like inf_field_FirstName and so on…

It’s already set to pass the information but we are hosting the unstyled html version of the form and we already have it formatted for use.

Jordan mentioned that,

“If you are using the HTML embed code, then you’ll have to have someone add javascript code to your website to pull the data from the URL and populate the form.”

I understand the need to pass the information into the URL but I am unclear on how to do so. Can you elaborate? Is this easy to explain and implement?

This is also something I’m a bit unclear on

“You need the API field names for each of those fields, and you build them onto the end of the URL in what is called a GET request (which means that you put contact data right onto the URL in field=value pairs). Here’s a quick example:”

I will send our developer a link to this thread but it would be nice if you could post some instructions to implement this.

1 Like

The first quote you have from Jordan says that you’ll have to use Javascript to pull the data from the URL. This is telling you that the information is already sent. You don’t need to worry about the form sending the information if you have the checkbox set. You said you had to know what to tell the developer. Give the developer the url to your form. They can view the source in a web browser and see what the names of the fields will be when the information is passed. BTW, if it wasn’t mentioned, you will need to redirect the thank you page of your form to where the developer needs it to go. The developer can then use Javascript to grab the information from the url and they will be able to do what ever is needed with it from there.

Hey Shane,

I think John didn’t catch that the form itself is hosted on your site using the unstyle HTML option instead of the javascript option - his instructions are for how to get the contact data out after the form is submitted, not for how to get the contact data onto the form in the first place.

You have more options for doing the pre-population on your website using the HTML version of the form, but all of those options require a developer who can go in and make it work. The developer will need to know that the contact details will be given in the URL as GET variables, and you’ll need someone to work with you on the Infusionsoft side to build the links correctly so that the data is on the URL in the way your developer is expecting.

@Jordan_Novak, I was wondering how your Autopopulate tool worked…so it only works when the form on the site is the Javascript version? Thanks!

So before we end up just bailing on doing this ourselves and buying software to do it for us. Can you tell us exactly how we need to do this. I understand the concepts you mentioned but I don’t know what to tell our developer. He’s a web developer, he doesn’t use Infusionsoft. I can tell him the names based on this thread for FName LName and Email but it would be nice to have some concise information to give him and work through.

Example. For those 3 field “This is what needs to be added to your URL”
“This is code the developer will need to use to make the get requests”

I’m simply trying to get this done as soon as possible.

1 Like

@Shane_Dutra, because I don’t have a developer’s head I would have the same questions as you. Have you considered using a 3rd party that does all this from what I understand?

If you use Wordpress, a plugin called FormLift can do this and more. It might be worth checking out. I don’t believe any developer work would be needed.

@Shane_Dutra If you’re using wordpress, then FormLift looks like an awesome option. Thanks for the recommendation @Cheryl_Hunt

After reading this thread plus doing some research I found this:

Pass Contact Information To A Url From An Automation Link

I’ve tested it and it appears that the contact info is included in the url…using the field label instead of the proper field name (Inf_field_FIELDNAME). This way, of course, does not work with current Infusionsoft forms.
So, how can we actually automate this without having to recur to third party solutions?

it’s solve-able with javascript. The script would just grab the url parameters and then set the values for the fields.

You could use your internal dev team or hire a dev (like me) or use one of the 3rd party apps.

hope it helps!

adding to mark’s comment, it might look something like this:

var url_string=window.location.href;
var url = new URL(url_string);
var qs=url.searchParams.get("code");
1 Like

Thanks @Mark_Price and @John_Borelli for your answers.

I found the solution and I’m posting it here hoping someone else can benefit.

In order to pass the contact information to an Infusionsoft form you need to add these parameters at the end of the url: ?inf_field_FIELDNAME=~Contact.FIELDNAME~

The difference with Jordan’s answer is that it adds the parameter value (~Contact.FIELDNAME~)

So if I wanted to pass first name and last name I would add this:

?inf_field_FirstName=~Contact.FirstName~&inf_field_LastName=~Contact.LastName~

The advantages of using this method over the automation link one are

  1. No need to go into each automation link separately to include the contact info in the url
  2. No need for further development as it already works with current Infusionsoft forms
  3. Works in campaigns any kind of automated sequence (which I guess was the original issue in this topic)

Hope it helps!