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.

Validating email addresses (ie. attempting delivery)

  1. Hi,

    Has anyone created a GF plugin to truly validates email addresses? I've found code out there that will do it, like this:

    https://code.google.com/p/php-smtp-email-validation/

    The code basically attempts to see if the email address is valid on the user's mail host. I can see why this might not be good (network delays, etc). But, in my case, we want to validate email addresses of people at one organization (Wheaton College).

    If noone has done this, could you point me in the right direction for doing so? Should this be an entirely new kind of field in GF, or is it possible to add an option to the existing email field?

    thanks.

    Posted 11 years ago on Friday March 29, 2013 | Permalink
  2. You can use the gform_validation filter to run that code and see is the email address is valid, then return an error if it is not. No need for a new field. http://www.gravityhelp.com/documentation/page/Gform_validation

    Posted 11 years ago on Saturday March 30, 2013 | Permalink
  3. Tobe
    Member

    Hi Chris, can that code also be used to ask users to answer a question like: "3+4=" instead of using a captcha?

    Posted 11 years ago on Saturday March 30, 2013 | Permalink
  4. If you install Really Simple CAPTCHA, you will be able to use a math challenge:
    http://wordpress.org/extend/plugins/really-simple-captcha/

    Here is a screenshot: http://minus.com/lk72tXICeL2Qy

    Your question is unrelated to the post by Wheaton College.

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  5. Chris, thanks. Is there a way to add an option to the existing email field. I can think of two options I might like:

    1) must be a somedomain.com email address

    2) validate this email address

    thanks.

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  6. How about something like this?

    http://gravitywiz.com/banlimit-email-domains-for-gravity-form-email-fields/

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  7. Thanks. This helps, but I'm wondering if I can add -options- to the existing email field?

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  8. I'm not sure what you mean about adding options. Can you explain more?

    Posted 11 years ago on Tuesday April 2, 2013 | Permalink
  9. Thanks. Sorry.

    I would like to use the standard email field. But, I'd like to add an advanced option or two to it.

    It could be similar to the current "Enable Email Confirmation" -- a simple checkbox. If the admin selects it, then my validation runs on the field upon submission.

    In my case, I think I'd like to add two options.

    - "Require a somedomain.com address"
    - "Validate email address by attempting delivery"

    Selecting either one of those would fire off the gform_validation hook code, which I'd write.

    Is it possible to add options like this to the existing email field (and other fields)?

    Posted 11 years ago on Tuesday April 2, 2013 | Permalink
  10. It looks like the hook I want is: gform_field_standard_settings ?

    Posted 11 years ago on Tuesday April 2, 2013 | Permalink
  11. I believe that's the correct hook to add options to the "Standard" tab of the field. http://www.gravityhelp.com/documentation/page/Gform_field_standard_settings

    Posted 11 years ago on Tuesday April 2, 2013 | Permalink
  12. thanks, I'm getting back to this now.

    Posted 11 years ago on Thursday April 25, 2013 | Permalink