Check out the LimeSurvey source code on GitHub!

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

3 years 3 months ago #101581 by dwbconsultancy

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.

3 years 3 months ago #101639 by tpartner
You will need to make an AJAX call to a remote script that queries the database for previous answers.

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.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form