Welcome to the LimeSurvey Community Forum

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

possible?: force unique answer

  • Questler
  • Questler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #122877 by Questler
possible?: force unique answer was created by Questler
Hello I am wondering if it is possible that I can force my users to give unique answers like their email.

I have a survey and in the end I ask for their telefone number. I want LS to give an error if the number already exists.
Is it possible without big hacking and coding?

Thanks
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 7 months ago #122878 by gabrieljenik
Replied by gabrieljenik on topic possible?: force unique answer
I guess that you need some JQuery for external validation.

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

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #122881 by tpartner
Replied by tpartner on topic possible?: force unique answer
To expand on Gabriel's reply - there is no method within LimeSurvey to check previous submissions. You will need to make an AJAX call to a remote PHP script that queries the database for previous responses.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Questler
The topic has been locked.
  • Questler
  • Questler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #122923 by Questler
Replied by Questler on topic possible?: force unique answer
That sounds complicated :unsure: But thanks for the answer.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 7 months ago #122944 by LouisGac
Replied by LouisGac on topic possible?: force unique answer
also have a look to the token system, maybe it could solve your problem in a different way than forcing unique answer.
manual.limesurvey.org/Tokens
The topic has been locked.
More
4 years 2 days ago - 4 years 2 days ago #195393 by Mutos
Replied by Mutos on topic possible?: force unique answer
Hello all,


I expected a "Unique answers" toggle in the question fields... Found none. So I have thought of two things :

- Topic dates back from 4 years ago : maybe 3.x or 4.x fixed this issue is a non-obvious way ?

- @Questler : did you find a solution to your issue ? REx would be appreciated ^-^ Thanks in advance !

@+

Benoît 'Mutos' Robin
Last edit: 4 years 2 days ago by Mutos.
The topic has been locked.
More
4 years 2 days ago - 4 years 2 days ago #195394 by Mutos
Replied by Mutos on topic possible?: force unique answer
Hi all,

Btw, for Questler's question, a token field would seem OK. I haven't tested, so I can't say if it's really OK with their other constraints.

For my constraints, it cannot work, as I need to limit the scope of the email field. It should be nice to be able to validate a register field by regexp...

@+

Benoît 'Mutos' Robin
Last edit: 4 years 2 days ago by Mutos.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 days ago #195395 by Joffm
Replied by Joffm on topic possible?: force unique answer
Hi,

there is no method within LimeSurvey to check previous submissions. You will need to make an AJAX call to a remote PHP script that queries the database for previous responses.


Still the "state of art" answer.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
4 years 2 days ago #195398 by Mutos
Replied by Mutos on topic possible?: force unique answer
Hi Joffm,


Thanks for the information ! Is there a known workaround ?

@+

Benoît 'Mutos' Robin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 days ago #195403 by Joffm
Replied by Joffm on topic possible?: force unique answer
Again,
do an ajax call and in a remote php script query the database either by direct access or maybe by the API.

MJoffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose