web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Email Validation on Landing Page

(0) ShareShare
ReportReport
Posted on by 10

Very new to the Marketing app, so this answer may be very obvious.

I created a Landing Page that acts as a 'Contact Us' page on our company's website. Upon submission of the form, the submitter receives an email thanking them for their submission and letting them know someone will follow up shortly.

I recently ran into an issue where few form submitters did not enter their email address correctly, so it caused a hard bounce of the outbound email to them. We've all seen forms that have an email field, and a 2nd email verification field that compares what's in both fields, and throws an error if they don't match. Is there any way to implement this on a Landing Page? Or are there any other suggestions on how to deal with someone accidentally entering their email wrong?

Thanks.

Mike

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at
    RE: Email Validation on Landing Page

    Hi Mike,

    You could create a new form field record, taking the Email Address 2 field of Contact as the 2nd email field for verification.

    pastedimage1602039219597v1.png

    Custom validation can be added to form with form API:

    At formSubmit event, check whether value of Email is equal to value of the 2nd email field, if yes, allow submission;

    if not, prevent submission and show an alert with error message to contacts.

    1. In form editor, set both of email fields to be required.

    2. Go live the landing page which is embedded with marketing form, get the id value of two email fields with inspector.(F12)

    4456.JPG

    3. Stop the live page, add following validation code after end tag of body, nest code in script tag.

    Replace id in sample code with your owns.

    6082.JPG

    MsCrmMkt.MsCrmFormLoader.on('formSubmit', function (event) {
    
    var verifyEmail = document.getElementById('frm24da2d4af-3e08-eb11-a813-000d3aa08990').value;
    
    var email = document.getElementById('frm2e1dfc514-f301-4cb2-855a-4c8fa8331207').value; 
    
    if (verifyEmail !== email) {
        event.preventDefault();
        alert("Make sure that the value of 'Email' is equal to the value of 'Verify your email'.");
    }
    
    });

    Result:

    Contact will receive an error message if value of two fields are not equal.

    pastedimage1602040731372v1.png

    Regards,

    Clofly

  • Mike M 904 Profile Picture
    10 on at
    RE: Email Validation on Landing Page

    Clofly,

    Thanks so much for taking the time to outline this. I'll definitely give this a shot, although I doubt my Marketing team will let me stop the live page, so this may be something I try for the next one.

    Thanks again, much appreciated!

    Mike

  • Mike M 904 Profile Picture
    10 on at
    RE: Email Validation on Landing Page

    Worked exactly as you outlined. Thanks again!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 122 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 101

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 62

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans