Re: Validate email address live on the landing page

Anonymous
Not applicable

Validate email address live on the landing page

Hi all,

Anyone knows if it's possible to do the following:

When a person keys in his email address in the Marketo landing page form:

  • If his email address is already in the Marketo list relevant to the landing page form, he will receive an on-site message saying "he has already signed up"
  • If his email address is not in the list, then he will go through the standard form submission process.

This will have to happen live. Any developers here who can point me in the right direction. What do you think I have to do to make this work?

Regards

Fred

16 REPLIES 16

Re: Validate email address live on the landing page

Hi Fred,

maybe this approach would help you: Show Custom HTML Form for Known People - Marketo Docs - Product Documentation

But this works only for leads who are cookied.

Best;m

Josh_Hill13
Level 10 - Champion Alumni

Re: Validate email address live on the landing page

That works for a Known person, however, if you want to tie it to the specific Registration list for that Page, you would need to develop some jquery.

Anonymous
Not applicable

Re: Validate email address live on the landing page

Hi Josh,

Thanks for your insight.


Another newbie question: I'll think Form 2.0 will make this work, but do you know how I can possibly retrieve and compare against a specific registration list using jquery?

Thanks in advance.

Regards

Fred

SanfordWhiteman
Level 10 - Community Moderator

Re: Validate email address live on the landing page

but do you know how I can possibly retrieve and compare against a specific registration list using jquery?

FTR: it's not a question of "jQuery" but JavaScript. (jQuery is merely an additional JavaScript library that's not important here, or really anywhere these days.)

Anyway, it is not possible to retrieve list membership directly from the browser using JavaScript.

Were it not for REST API limits, it might be feasible to query a separate server using JavaScript. That server, in turn, would use the API to look up lead membership. But alas, this method can't be used on a public form.

What you can do is:

  • submit the form, then check every, say, 1 second for a total 10 seconds for the web session to be associated by refreshing the Thank You page
  • once it's associated, you'll see {{lead.tokens}} in the page (that's how you know Marketo has finished merging the lead)
  • have a Smart Campaign triggering on Filled Out Form; on the Flow, start with a Wait step of 30+ seconds, then run Change Data Value on a field, for example, memberOfLists
  • since memberOfLists won't change until after the 10s polling period has elapsed, you're assured that if you see the name of the list, that means they were already in the list.
  • profit accordingly

While bit clunky, this approach could be implemented quickly by a skilled developer.

Anonymous
Not applicable

Re: Validate email address live on the landing page

Hi Sanford,

Thanks for the insightful answer (:

I guess the alternative approach you suggest is not something that can be deployed live, in the sense it takes place when the button is clicked, and based on whether the person is already in the list or not, I can show something different (like different form, url etc.). Am I right to say that?

Regards

Fred

SanfordWhiteman
Level 10 - Community Moderator

Re: Validate email address live on the landing page

...is not something that can be deployed live, in the sense it takes place when the button is clicked, and based on whether the person is already in the list or not, I can show something different (like different form, url etc.). Am I right to say that?

No.... why would I have suggested it if it couldn't be used?  You have ​some guaranteed latency when you perform a remote lookup in response to a button click, and this method might be on the high end of user-facing delays on occasion, but it can be used "live."

SanfordWhiteman
Level 10 - Community Moderator

Re: Validate email address live on the landing page

Btw, here's an example of such a form in action:

${pagetitle} - Edited.gif

Note this doesn't use the server APIs in any way (I would never do that) merely the Forms 2.0 JavaScript API as I described above.

Nav_Singh1
Level 2

Re: Validate email address live on the landing page

Do you have a sample of your code online Sanford?  I think this is interesting and could potentially soluse-casesecase.

SanfordWhiteman
Level 10 - Community Moderator

Re: Validate email address live on the landing page

It will be a blog post soon.