Verify/Validate Email Address on Form | Community
Skip to main content
November 20, 2013
Solved

Verify/Validate Email Address on Form

  • November 20, 2013
  • 5 replies
  • 10725 views
It's a fairly common practice to have an "Email" field on your form as well as a "Confirm/Verify Your Email" to ensure that there won't be the chance to enter an email address erroneously.  Is there a way to do this in Marketo?  I can't imagine I'm the first person to ask about this...

Tony
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Of course, read my response here: How to Restrict Free Email Domains on Form Fill Out in 2021 

5 replies

Milena_Mitova
New Participant
October 9, 2020

Marketo already have a script in place that you can use and modity. I have used their script with a slight modification - happy to share the script that I added in my blog here, along with a step-by-step tut on how you need to implement it: https://www.campaigntrackly.com/marketo-add-email-address-confirmation-to-your-forms-in-5-easy-steps/

 

Hope this is useful! 

March 13, 2015
How do you set the attibute of the submit button?

onclick=" return checkEmail('email1','email2');"
January 20, 2015
Alison

Yes this method requires a second field for the Verify / Confirm email address. As this is not a standard field you would need to create it under Administration.
January 20, 2015
Does this method require two email address fields? i.e. create another field in Marketo admin?

Thanks
November 21, 2013
A very small JavaScript/jQuery can compare the two input fields.

It can be added as custom forlm validation.

 
<script type="text/javascript"> 
function checkEmail(email1,email2) { 
   var e1 = document.getElementById('email1').value; 
   var e2 = document.getElementById('email2').value; 

   if (e1 != e2) { 
      return true; 
   } 
   else 
   { 
     alert('Plerase verify the email address!'); 
    return false; 
   } 
</script> 
 
 
and set the additional attribute of the submit button to
Code:
onclick=" return checkEmail('email1','email2');"


Adding custom validation to a Marketo form before submitting it
community.marketo.com/MarketoResource?id=kA650000000Gtt6CAC
 

Jason_Reber__TH
New Participant
December 10, 2015

The above link to the Marketo resource page doesn't work. Correct link is: Adding custom validation to a Marketo form before submitting it

But be warned, the information in that help article appears to be incorrect as well.

And I agree with the original post - having a Confirm Email Address functionality is pretty standard stuff, and should work out of the box in Marketo.