# Passing Contacts Fields into Web form Hosted on our Website

**URL:** <https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399>\
**Category:** Max Classic\
**Created:** [December 7, 2017, 7:23am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399 "2017-12-07T07:23:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 7, 2017, 7:23am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/1 "2017-12-07T07:23:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [December 7, 2017, 5:00pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/2 "2017-12-07T17:00:30Z")

</div>

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: [Autopopulate Webform — Novak Solutions](https://pages.novaksolutions.com/autopopulate-webform)

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 7, 2017, 10:48pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/3 "2017-12-07T22:48:04Z")

</div>

Yes please,

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

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 8, 2017, 7:22am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/4 "2017-12-08T07:22:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [December 8, 2017, 2:56pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/5 "2017-12-08T14:56:11Z")

</div>

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](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”

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 8, 2017, 11:03pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/6 "2017-12-08T23:03:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [December 9, 2017, 8:07pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/7 "2017-12-09T20:07:17Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 9, 2017, 10:28pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/8 "2017-12-09T22:28:08Z")

</div>

[Test - Powered by Keap](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.**

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [December 10, 2017, 7:52am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/9 "2017-12-10T07:52:27Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 10, 2017, 8:23am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/10 "2017-12-10T08:23:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [December 10, 2017, 4:43pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/11 "2017-12-10T16:43:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [December 11, 2017, 6:37pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/12 "2017-12-11T18:37:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cheryl\_Hunt](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/cheryl_hunt/32/287_2.png) [@Cheryl\_Hunt](https://integration.keap.com/u/Cheryl_Hunt)\
**Post date:** [December 11, 2017, 7:15pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/13 "2017-12-11T19:15:48Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![Shane\_Dutra](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shane\_Dutra](https://integration.keap.com/u/Shane_Dutra)\
**Post date:** [December 11, 2017, 10:13pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/14 "2017-12-11T22:13:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cheryl\_Hunt](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/cheryl_hunt/32/287_2.png) [@Cheryl\_Hunt](https://integration.keap.com/u/Cheryl_Hunt)\
**Post date:** [December 11, 2017, 10:32pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/15 "2017-12-11T22:32:48Z")

</div>

@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](https://formlift.net/) can do this and more. It might be worth checking out. I don’t believe any developer work would be needed.

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [December 11, 2017, 10:58pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/16 "2017-12-11T22:58:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nicolo\_Franchi](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Nicolo\_Franchi](https://integration.keap.com/u/Nicolo_Franchi)\
**Post date:** [April 3, 2018, 1:33pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/17 "2018-04-03T13:33:25Z")

</div>

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

[Pass Contact Information To A Url From An Automation Link](https://help.infusionsoft.com/userguides/campaigns-and-broadcasts/email-broadcast-automation-links/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?

---

<div class="post-metadata">

**Author:** ![Mark\_Price](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mark\_Price](https://integration.keap.com/u/Mark_Price)\
**Post date:** [April 3, 2018, 5:22pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/18 "2018-04-03T17:22:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [April 3, 2018, 6:42pm UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/19 "2018-04-03T18:42:31Z")

</div>

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");

```

---

<div class="post-metadata">

**Author:** ![Nicolo\_Franchi](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Nicolo\_Franchi](https://integration.keap.com/u/Nicolo_Franchi)\
**Post date:** [April 4, 2018, 8:41am UTC](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399/20 "2018-04-04T08:41:59Z")

</div>

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!

[Next page](https://integration.keap.com/t/passing-contacts-fields-into-web-form-hosted-on-our-website/23399.md?page=2)
