SOLVED

Form AutoFill Q - Does it only work w/ Marketo JS

Go to solution
angusmcjs
Level 1

Form AutoFill Q - Does it only work w/ Marketo JS

We are in the middle of launching our Marketo instance and the solution we are implementing for our site is that we are having a hardcoded webform post to the marketo form in the UI.

My question is, if we used a hidden field to capture UTM params with a pre-fill, does that need to be passed along with the post given that we are not loading/embedding the marketo form directly on the page, or because the pre-fill is based on UTM params, is that something Marketo parses from the URL meta data post-submission?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Form AutoFill Q - Does it only work w/ Marketo JS

No, the opposite.

 

You aren’t using the JS library, so nothing will be parsed for you. You need to parse and pass the individual field values as you would any other string field.

 

Like I said above:

 


Marketo will have no idea what you did on your form or server to populate the fields, all of that is up to you


 

Btw, using the Forms 2.0 JS library is a lot more scaleable than doing this on your own server. Not sure what exactly led you down that path but you may wish to reconsider the design.

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Form AutoFill Q - Does it only work w/ Marketo JS

You were mixing up "Pre-Fill" and "Auto-Fill" (I edited the title of your post).

Hidden fields can be Auto-Filled from query params.

Pre-Fill refers to loading the Person's current values into the form (the fields may be hidden or visible).

When you say 'having a hardcoded form post... in the UI' I assume you mean you're posting a hidden Marketo form using the JS API, correct?

In this case you can have the hidden fields be only on the (also hidden) form. They do not need to be processed by your JS at all, as they will still be Auto-Filled even when hidden.
angusmcjs
Level 1

Re: Form AutoFill Q - Does it only work w/ Marketo JS

Awesome! Thank you for confirming.

I thought that query params was an option to select, but the UI isn't letting me select that as an option - do you know if this is something I need to go to my rep about?

 

Screen Shot 2021-12-29 at 11.42.17 AM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Form AutoFill Q - Does it only work w/ Marketo JS

“URL Parameter” means “Query Parameter”.

 

(Modern-standards-wise, the term would be “URL Search Parameter”.)

angusmcjs
Level 1

Re: Form AutoFill Q - Does it only work w/ Marketo JS

Sorry just an edit for clarity - we are not using a hidden form / the Marketo JS library at all. One of the developers I worked with help clarify the solution we are working with and see if that changes your answer: 
"I would ask them if it's possible to use the metadata query params inside of the REST API request that we are making to their formSubmit API endpoint."

SanfordWhiteman
Level 10 - Community Moderator

Re: Form AutoFill Q - Does it only work w/ Marketo JS


"I would ask them if it's possible to use the metadata query params inside of the REST API request that we are making to their formSubmit API endpoint."

The fields you pass to the Form Submit API have to be present in Form Editor (i.e. in the form descriptor that’s associated with the form ID).

 

But it doesn’t matter whether they’re hidden or visible. And, if hidden, doesn’t matter whether you have them set up to Auto-Fill or not.

 

Marketo will have no idea what you did on your form or server to populate the fields, all of that is up to you. You could fill them from cookies, local storage, query params, random bytes, whatever.

angusmcjs
Level 1

Re: Form AutoFill Q - Does it only work w/ Marketo JS

So just to confirm, the auto-fill would still work to pull the utm params from the query string? Those values don't need to be passed to the form? Because that's where I'm stuck - we've tested it, and it doesn't seem to be taking the UTM params from the URL

SanfordWhiteman
Level 10 - Community Moderator

Re: Form AutoFill Q - Does it only work w/ Marketo JS

No, the opposite.

 

You aren’t using the JS library, so nothing will be parsed for you. You need to parse and pass the individual field values as you would any other string field.

 

Like I said above:

 


Marketo will have no idea what you did on your form or server to populate the fields, all of that is up to you


 

Btw, using the Forms 2.0 JS library is a lot more scaleable than doing this on your own server. Not sure what exactly led you down that path but you may wish to reconsider the design.