Welcome to the LimeSurvey Community Forum

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

only letters (A-Z) in respons

  • amsta1
  • amsta1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
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 topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago - 2 years 9 months ago #218286 by tpartner
Replied by tpartner on topic only letters (A-Z) in respons
Insert a question validation equation something like this:
 
 
Code:
is_empty(this) OR regexMatch("/^[A-Z]+$/", this)

- manual.limesurvey.org/ExpressionScript_-...mplemented_functions

Sample survey attached: 

File Attachment:

File Name: limesurvey...1446.lss
File Size:18 KB

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
  • amsta1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #218291 by tpartner
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
  • amsta1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #218313 by tpartner
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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #218318 by DenisChenu
Replied by DenisChenu 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.
 
:applause:

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.

Lime-years ahead

Online-surveys for every purse and purpose