I have created a form that has a hidden field with the label "UID". I use this field to store a custom unique identifier based on a few different user variables.
Before saving the form I want to check if the UID already exists in the database. If the field was not hidden I could check the "no duplicates" checkbox on the field and it would be validated as required.
How do I go about achieving this with a hidden field? I have been looking at the "gform_is_duplicate" hook and not had much luck in getting it to work.