This may be a naive question, but is there a way to make a form appear on a landing page based certain lead information? We would like a form to pop up for some leads and not others. I know a variation of this is possible based on whether they are "known" or have been cookied before, but not sure if it can be done based on lead values.
Thanks,
Catherine
You need a developer to do this based on the conditions you want. Do you have a front end dev?
Thanks, Josh. Do you have any examples or snippets of JS that actually does this? Struggling to find an example of this.
Like Josh says, if you aren't & don't have a dev, this will get confusing fast. But at its simplest, you can hide the form by default, then output a lead token and use it in a conditional unhide:
if ( "{{lead.stage}}" == "ready for forms" ) {
MktoForms2.whenReady(function(form){
var formEl = form.getFormElem()[0];
formEl.className += " okayToShow";
});
}
There's a code-free method as well: use Dynamic Content to segment the form, then switch between the real form and a dummy form whose form ID is always hidden. (So you don't need JS, just CSS.)
Thanks, Sanford. We were able to get it to work following your format.
Do you know if form pre-fill is able to work with a pop-up?
Catherine
It depends on what you mean by "pop-up".
In your case above you're just hiding/showing the form, not popping it up per se.
If you pop up using the native Marketo lightbox functionality, sure.
If you use a separate popup/lightbox library, this can also be made to work as long on a Marketo LP with a little JS.