
Announcements
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
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");
}
});