SOLVED

Re: Verify/Validate Email Address on Form

Go to solution
Anonymous
Not applicable

Verify/Validate Email Address on Form

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
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Verify/Validate Email Address on Form

9 REPLIES 9
Anonymous
Not applicable

Re: Verify/Validate Email Address on Form

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
 

Jason_Reber__TH
Level 2

Re: Verify/Validate Email Address on Form

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.

AyanTalukder
Level 1

Re: Verify/Validate Email Address on Form

Is there a way to apply email validation to avoid consumer email types like hotmail, gmail, yahoo, etc.?

SanfordWhiteman
Level 10 - Community Moderator

Re: Verify/Validate Email Address on Form

AyanTalukder
Level 1

Re: Verify/Validate Email Address on Form

You are too fast, right after i posted that I found your old post haha. 

Anonymous
Not applicable

Re: Verify/Validate Email Address on Form

Does this method require two email address fields? i.e. create another field in Marketo admin?

Thanks
Anonymous
Not applicable

Re: Verify/Validate Email Address on Form

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.
Anonymous
Not applicable

Re: Verify/Validate Email Address on Form

How do you set the attibute of the submit button?

onclick=" return checkEmail('email1','email2');"
Milena_Mitova
Level 2

Re: Verify/Validate Email Address on Form

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!