PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Pre-Purchase Question - Restrict User Registration Email TLD

  1. joshpaschall
    Member

    I'm wondering if it is possible with the User Registration Add-On to restrict user registration to only emails with a certain TLD (.edu for example)? Is there a setting for this or is there an example of the modification needed to make this work?

    Posted 11 years ago on Friday March 15, 2013 | Permalink
  2. David Peralty

    Sorry, I didn't realize this was a pre-sales question when you had asked it before. I thought you had already purchased. You would have to implement some custom code in your theme's functions.php file to do this by using our gform_field_validation hook:
    http://www.gravityhelp.com/documentation/page/Gform_field_validation

    You would grab the e-mail address, check to see if it ends in edu and if it doesn't, send back an error.

    Posted 11 years ago on Friday March 15, 2013 | Permalink
  3. Additionally, our developer David Smith has done some of the hard work already and has a code example here: http://gravitywiz.com/banlimit-email-domains-for-gravity-form-email-fields/

    Posted 11 years ago on Sunday March 17, 2013 | Permalink