Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Do not allow to submit a marketing form with a private email

(0) ShareShare
ReportReport
Posted on by 25

Hi, 

is it possible to not allow form submission if a private email is inserted and to require to enter a business email? Basically it would mean blocking all the gmail.com and co. email domains on a specific form.
There are some cases when e.g. only clients are allowed to participate, so we can only allow registration with business email addresses. 

Thanks!

Regards

  • Verified answer
    Nya Profile Picture
    Nya 29,058 on at
    RE: Do not allow to submit a marketing form with a private email

    Hi,

    You can add some JavaScript into your marketing form to validate the email address.

    Please refer to the following documentation to know more about it.

    Extend marketing forms using code (Dynamics 365 Marketing Developer Guide) | Microsoft Docs

    The code snippet could be something like:

    MsCrmMkt.MsCrmFormLoader.on('formSubmit', function (event) {

    var verifyEmail = document.getElementById('xxxxxxxxxxxxxxxxxxx').value;

    if (verifyEmail == xxxxxx) {
    event.preventDefault();
    alert("xxxxxxxxxxxxxxx");
    }

    });

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,234 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans