Home | Cool ClickDimensions Features | Blocking free email addresses on ClickDimensions web forms

Blocking free email addresses on ClickDimensions web forms

Because the ClickDimensions form designer allows the use of custom regular expressions it is possible to block specific email domains form being entered in the email address field on a web form. By placing the script below in the regex box for a web form the domains gmail, yahoo, Hotmail and Live will be blocked on the form.

/[A-Z0-9a-z._%+-]+@(?!.*gmail.*)(?!.*GMAIL.*)(?!.*yahoo.*)(?!.*YAHOO.*)(?!.*hotmail.*)(?!.*HOTMAIL.*)(?!.*live.*)(?!.*LIVE.*)[a-z]*[A-Z0-9a-z.-]+.[A-Za-z]{2,4}]*/

Start by opening the form designer for the form you want to modify. Select the email field and double click to see its properties or click the field properties button…

Select the formatting tab and paste the regular expressions script into the regex field. Also, change the error message to something descriptive. We went with “Please enter a valid address from a corporate (i.e. non-free) domain”…

Save the form. Now when people try to enter a gmail, yahoo, Hotmail or live email address they will see the following error. Note that our script also validates that any email address has the proper format…

About the Author:

mm
The ClickDimensions marketing team is committed to helping marketers using Microsoft Dynamics 365 achieve their goals.

Leave A Comment