This document is for an older version of

Freeform

.

View latest version →

User Guides

Preventing Certain Email Addresses

If you'd like to prevent users from using certain types of email addresses (for example, you don't want them using common free ones like Gmail, Yahoo, etc), you can do this by somewhat "misusing" the Block Email addresses feature inside Freeform's Spam Settings area. It's meant to allow you to block common sources of spam, but technically can allow you to prevent legitimate users from using certain email address domains, and you can display an error for them too. Here's how you would set it up:

Instructions

  • Go to CP -> Freeform -> Settings -> Spam Settings.
  • In the Block Email addresses field, add some email address domains with wildcards like:
    • *@yahoo.com
    • *@gmail.com
    • *@hotmail.com
    • *@aol.com
  • Enable the Display errors about blocked email(s) under each email field? setting.
  • Under that setting, in the Blocked Emails Error Message setting, add a message such as Email not allowed. Please use your company email address.
  • Save settings.
Finished!

Once that is all applied, any user submitting the form with an email address like hairylover28@aol.com will see an error when the form is submitted, and below the Email field it will say:

Email not allowed. Please use your company email address.