Field validation to prevent user entering a value already in the database?

More
3 years 5 months ago #101581 by dwbconsultancy
dwbconsultancy created the topic: Field validation to prevent user entering a value already in the database?
Hi,

I want to have a field in my survey - just a simply short text field - that won't allow the user to enter a value if it has already been provided as an answer by someone else (same field, same survey, different users). The validation should NOT be case sensitive.

The survey is asking people's suggestions for names (animal rescue charity), so if they suggest a name that has already been suggested by another survey return it should not allow them to submit the survey until they change it.

Can this be done, and if so any suggestions as to how?

Please Log in to join the conversation.

More
3 years 5 months ago #101639 by tpartner
tpartner replied the topic: Field validation to prevent user entering a value already in the database?
You will need to make an AJAX call to a remote script that queries the database for previous answers.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now