Expected behavior if multiple fields have "No Duplicates" ticked [RESOLVED]

I’m been trying to read the code to understand the behavior, but I didn’t understand it well enough to be confident.

If 2 fields have “No Duplicates” marked (such as “Email” and “Comment”), does Gravity Forms expect:

  • Only allow submission to work if that combination of those two fields have never been submitted?
  • Only allow submission to work if that combination of those two fields aren’t in the current list of entries (so once purged, duplicates can resume)?
  • Both email OR comment never submitted (so bob@bob.net only ever submit one form, even if the comment changes)

No Duplicates is a field setting, therefore validated over the value sent for the field where you enable it. There’s no “combination” of any kind when you enable it for multiple fields.

So if you enable this setting for “Email”, it will validate the value entered based on previous values saved for this form field.

If you enable it also in another field, like “Comment”, it would validate previous values for “Comment”.

Each field validation process it’s completely unrelated.

If you want to compare values for two different fields for validation purposes, you will want to create some custom validation code for it. Here’s an example: gform_field_validation - Gravity Forms Documentation

1 Like

Can you confirm that the “validation” is against the entries currently stored (so if “Delete entries permanently automatically” is set, once an entry is deleted by that method a new form submission would be allowed)?

Once an entry is deleted from Trash, it would be possible to submit values that were used in that deleted entry for a new submission.