- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
only letters (A-Z) in respons
- amsta1
- Topic Author
- Offline
- New Member
Less
More
2 years 9 months ago #218284
by amsta1
only letters (A-Z) in respons was created by amsta1
I would like only (capital) letters (A to Z) possible in an answer (so the respondents are not allowed to give numbers as an answer). The questiontype I selected is: short free text (type S).
The LimeSurvey version I use is 3.17.0+190402
I hope someone knows how to tackle this?
thanks!
The LimeSurvey version I use is 3.17.0+190402
I hope someone knows how to tackle this?
thanks!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
2 years 9 months ago - 2 years 9 months ago #218286
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 only letters (A-Z) in respons
Insert a question validation equation something like this:
- manual.limesurvey.org/ExpressionScript_-...mplemented_functions
Sample survey attached:
Code:
is_empty(this) OR regexMatch("/^[A-Z]+$/", this)
- manual.limesurvey.org/ExpressionScript_-...mplemented_functions
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 9 months ago by tpartner.
The topic has been locked.
- amsta1
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
2 years 9 months ago #218290
by amsta1
Replied by amsta1 on topic only letters (A-Z) in respons
thank you, but this does not work unfortunately. I am still able to give a number for an answer...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
2 years 9 months ago #218291
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 only letters (A-Z) in respons
Really? In my sample survey, you can advance past the first screen with a number in Q1?
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: DenisChenu
The topic has been locked.
- amsta1
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
2 years 9 months ago #218300
by amsta1
Replied by amsta1 on topic only letters (A-Z) in respons
thank you, I think I have put the code in the wrong field. I now used /^([^0-9]*)$/ in the validation field (at general options) to prevent respondents to give a number as an anwer. Now it works!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
2 years 9 months ago #218313
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 only letters (A-Z) in respons
I don't know why I bother with sample surveys. In the survey I provided, you would have seen it in the "Question validation equation" field.
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: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
2 years 9 months ago #218318
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic only letters (A-Z) in respons
:applause:I don't know why I bother with sample surveys. In the survey I provided, you would have seen it in the "Question validation equation" field.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.