Welcome, Guest
Username: Password: Remember me

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

Field validation to prevent user entering a value already in the database? 11 months 1 week ago #101581

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 administrator has disabled public write access.

Field validation to prevent user entering a value already in the database? 11 months 1 week ago #101639

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.109 seconds
Donation Image