No Duplicates on Hidden Field that is pre-populated with a Default Value [RESOLVED]

I’ve set up a GF to allow a user to upload a file. I’d like to do the following:

Require users to be logged into my website.
Create form with two Fields: Email and File Upload
Pre-populate the email field Default Value with the logged in user email using {user:user_email}.
Restrict users from uploading another file on the logged in user email.

As I have it set now, I can’t hide the email field and restrict duplicates. Logged in users can submit the form multiple times. I’m sure that I’m capturing the logged in user email - I can see it in my testing entries. If I set the email field to Visible, then it works as expected: No Duplicates results in an error message, and the form cannot be submitted a second time.

I’ve also tested this with username - same settings yield same results.

Is it possible to create this kind of restriction on a hidden, pre-populated field?

Answering my own question by adding the response I received from GF Support.

That is expected behavior, the No Duplicates validation logic will skip hidden fields. What you could do is set the field to be visible and then add “gf_invisible” (without the quotes) to the field’s Custom CSS Class setting in its appearance tab, that should allow the field to be hidden and still be looped into the No Duplicates logic on submission.

Simple solution that just worked - thanks GF Support!

Thanks for posting that Marco.