- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
possible?: force unique answer
- Questler
- Topic Author
- Offline
- New Member
Less
More
8 years 8 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
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
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 272
- Thank you received: 45
8 years 8 months ago #122878
by gabrieljenik
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 .
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
8 years 8 months ago #122881
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
8 years 8 months ago #122923
by Questler
Replied by Questler on topic possible?: force unique answer
That sounds complicated But thanks for the answer.
The topic has been locked.
- LouisGac
- Visitor
8 years 8 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
manual.limesurvey.org/Tokens
The topic has been locked.
- Mutos
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 2
4 years 1 month ago - 4 years 1 month ago #195393
by Mutos
@+
Benoît 'Mutos' Robin
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 !
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 1 month ago by Mutos.
The topic has been locked.
- Mutos
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 2
4 years 1 month ago - 4 years 1 month ago #195394
by Mutos
@+
Benoît 'Mutos' Robin
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...
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 1 month ago by Mutos.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
4 years 1 month ago #195395
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic possible?: force unique answer
Hi,
Still the "state of art" answer.
Joffm
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.
- Mutos
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 2
4 years 1 month ago #195398
by Mutos
@+
Benoît 'Mutos' Robin
Replied by Mutos on topic possible?: force unique answer
Hi Joffm,
Thanks for the information ! Is there a known workaround ?
Thanks for the information ! Is there a known workaround ?
@+
Benoît 'Mutos' Robin
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
4 years 1 month ago #195403
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
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.