Check out the LimeSurvey source code on GitHub!

Check if entered number is unique

More
5 years 1 week ago #74286 by hovardkr
Hi!

In our survey we have a numeric field where the customers enters a code that can be used once.

How can I check if this code has not allready been used?

Please Log in to join the conversation.

More
5 years 1 week ago #74293 by holch
With the normal Limesurvey tools, there is no possibility to check if it has been used in any other survey. You will need to do some custom programming to read the database and check if the code exists already.

For what do you need the code? Maybe the token feature can already solve your problem?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 1 week ago #74351 by DenisChenu
Hello,

The only solution seem to use ajax, call a ajax function after click on movenext, this function take the number already set in the database, and return false if the number exist.

There are some work for a good javascript and php script solution.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

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