We've created a progressive profiling form and it's working exactly as intended (i.e. showing only those fields that we want for a return visitor). However, we would really love to take advantage of the "Not You" return visitor Custom HTML feature in Marketo by adding it to our Progressive Profile form. As far as I am aware, Marketo only allows either/or, not both. Is there a way to do this? (see screenshot)
Solved! Go to Solution.
I implemented the FormsPlus::Util library onto a page, and it's working great! (exactly as expected) Do you know how I would hide the "Not You" button, and only show it when that Marketo tracking cookie exists?
I don't think you mean if the cookie exists, you mean if the cookie is associated with a known lead.
The easiest way to add that logic is to hide the Not You? by default, then add a class to the element to unhide it if there are any non-null Pre-Filled fields*:
return value !== null;
// do something to unhide the Not You?, like classList.add() etc.
*This doesn't give absolutely full coverage because it's possible, if extremely unlikely, that all the relevant fields are currently null, including the Email Address, but the lead is still in the database.
A complete solution would be using the /getKnownLead endpoint but that's another kettle-ball of wax-fish.