Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

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

  • dwbconsultancy
  • dwbconsultancy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #101581 by dwbconsultancy
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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 4 months ago #101639 by tpartner
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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose