Validation Taking A Very Long Time

Hi All,

I’m having an issue with a form taking a very long time to validate before showing the next form.

I do not know if it’s a GravityForm fix or a server side issue but I’m running into 2 issues:

  1. Sometimes the form takes a long time to validate before showing the next part of the form
  2. A user can hit “Next” twice with the correct code and then it shows - which is great, but shouldn’t have to hit next twice.

Mind you, the code list contains about 2.7 million unique codes but wondering if there is a way to speed the process up. It was working fine before but not sure what’s going on now and running out of ideas.

The site I’m using this on is

If anyone wants to test - they can use the code 12345 (there are no duplicates so if I see it in the back-end I will remove it and it can be used again)

This is also my php settings:

What sort of validation is being performed on that field? How is it checking against 2.7m unique codes?

Hey Chris - I’m using this method - Conditional logic with a data set

It’s matching it against validation codes in a TXT file.

Another note - so when it takes a very long time to validate, I click the next button a second time, after like 5-7 seconds after my first next attempt (sometimes it just spins forever), and then it goes through. Not sure why it works that way.

Going through 2.7m codes in a file, one by one, is not going to be very efficient. I recommend storing those in a database table and then querying the table for the code that is submitted.

1 Like

Hi Chris,

Thanks for the response! Okay, I’ll see if I can accomplish that. Is there a thread I can look to or some documentation on how to do this?

I’ll have a look through the forums as well.

Just replace the part taken from your link…
…with simple wp query fct