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.

Multiple Duplicates

  1. I have a client who wants to avoid duplicate entries to his form. However, they want to check multiple by checking against first AND last names. The idea behind this is that more than one family member, who may be using the same email address, can each submit the form without throwing a duplicate error on the email address.

    The problem is that the First and last name fields are separate and the client does not want to change that. Obviously, I can't just check to not allow duplicates on the first and last name fields as they will be checked individually and not allow for multiple entries of common names like Bill, or last names like Smith. This would lead to major issues. I and the client have talked this over and they insist on checking for duplicates this way instead of by email.

    Is there a way to rewrite or overwrite the base is_duplicate() function in a theme's function.php file much like one would do a core WP function rewrite? My thinking was to copy that function from the forms_model.php file, paste it to my theme's function.php file and make my alterations there via PHP.

    Posted 13 years ago on Wednesday March 23, 2011 | Permalink
  2. You raise a good point about the no duplicates on the Name field, we can look into how we can better handle this as it would make sense to check for a duplicate full name, not individually.

    It is possible to write your own custom validation using the gform_validation hook. Here is documentation on the gform_validation hook:

    http://www.gravityhelp.com/documentation/page/Gform_validation

    Posted 13 years ago on Wednesday March 23, 2011 | Permalink
  3. I second request this feature. Since it should not just validate the first and last name, but also the email adress (all 3 Points together). Because there are john smith's more than once...

    Do you have already a code snippet for that. I'm not a programmer and php is to difficult for me. But implementing the code should work fine.

    As a feature request: As an Option, one should select, which fields are in combination to proof for duplicates.

    Posted 12 years ago on Tuesday December 4, 2012 | Permalink
  4. David Peralty

    I'll move this to feature requests so that our developers add it to their list. We don't already have a snippet for this and as such, you'll have to hire a developer if you want it created. We have a job board on this forum, and I also recommend sites like jobs.wordpress.net and odesk.com

    Posted 12 years ago on Tuesday December 4, 2012 | Permalink