How to autofill forms without social implementation | Community
Skip to main content
August 17, 2015
Question

How to autofill forms without social implementation

  • August 17, 2015
  • 1 reply
  • 1121 views

Is there a way to autofill a marketo form based on product information? We have a product page (for example) that has an order sample button that we wish to lead to an auto-filled marketo form. Is this possible?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
August 17, 2015

Sure, pass the data in the URL and then render it into a form on a target page.

In the source page, the button links to example.com/page-with-form.html?formField1=<value1>&formField2=<value2>

In the target page, the form can have hidden fields set to pull from query parameters (this feature is built into Form Editor 2.0).  Or if you want visible fields, you can pull them from the URL and then

MktoForms2.whenReady(function(form){

  form.setValues{{ formField1 : <value1>, formField2 : <value2> });

});

August 24, 2015

the issue with this is that i need the form to autopopulte from an external source

SanfordWhiteman
Level 10
August 24, 2015

What exactly do you mean "an external source"?  You referred to a product page linking to a form on another page.  If the product page "knows" the data you wish to push to the form, then you add it to the URL as I showed.