Hi
I have lot of embedded forms on non-Marketo pages and I would like to make it easier for the visitor to e.g. fill in a webinar forms or ebook download forms.
Idea 1: pre-fill known fields
This doesn't work as the pre-fill unfortunately doesn't work with embedded forms on non-Marketo pages.
Idea 2: "If Known Visitor, Show:" custom html
This does work with embedded forms but the problem is that hidden fields don't take my cookie values.
Anyone other ideas? Transferring the content to Marketo landing pages is a no
Hi Nick,
Log ideas rather than questions . People can vote and they are reviewed by Product Management.
Idea 1: pre-fill known fields
There are a lot of discussions and ideas already in the community on this. To make it short, there are good data security reasons for not doing this as someone could use your JS code to steal your data.
Idea 2: "If Known Visitor, Show:" custom html
Worth and idea so that we can vote for. Can be worked around with javascript, though.
-Greg
Nick, you can reenable cookie (and query param) support via the code here: MktoForms2 :: KL HTML w/Auto-Fill
Note the dependency on the FormsPlus::Util (the <script> in the HTML pane).
Once you have that set, the only part you need to change is this little JSON block:
var hiddenFieldMap = {
Last_Result__c: {
channel: "query",
selector: "utm_results"
},
Field_From_Cookie: {
channel: "cookie",
selector: "ahoy_visitor"
},
Another_Field_From_Constant: {
channel: "constant",
selector: "Always use this value."
}
};
Hopefully, this is nearly self-explanatory...
I am actually having this cookie issue with my non-embedded forms. Basically not getting query parameter support when the "If Known Visitor, Show:" custom html is in use.
Will the JSON script above also reenable this data for me? If so where should I place that script?
Thank you so much for your help!
Boone White
Sure, Boone, you can use the same JS with any Marketo form, whether on a Marketo LP or on another site.
On a Marketo LP, you would include the formsplus-util.js <script>, then the custom JS in another <script>, right before the closing </body> tag.
Okay I think I have my mind wrapped around this.
Just to confirm. I am on the right track. Should I make unique properties for each field and related UTM parameter?
See this example for UTM medium:
Thank you so much Sanford, This has been extremely helpful.
Boone
That's right. The property name in the hiddenFieldMap is the Marketo field name. The property value is an object that describes how/from where the field will be filled.
Great, so I will make unique ones for each.
And query would always be the right channel for that yea?
Right, query = query param.
I have a newer version to publish soon that allows some more channels (like Referrer URL param, which I left off this quick CodePen the other day) and also allows for a "cascade" of channels, i.e. get from such-and-such cookie if exists, otherwise get from such-and-such query param, otherwise look for this other query param... extremely useful. I don't think I'll ever go back to the built-in hidden field AutoFill.
Sorry I deleted my prior responses.
For the HTML bit Do I need to paste the whole bit and update all the info to my form/instance details? or do I just need a piece from that code?
Thank you!
Boone