- Posts: 22
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Differents validations for differents subquestions in a numeric multiple answer
- helviobrito
- Topic Author
- Offline
- Junior Member
Less
More
8 years 2 weeks ago #134098
by helviobrito
Differents validations for differents subquestions in a numeric multiple answer was created by helviobrito
Hi. Please, can someone help me with this task?
I have a multiple answer numeric question and need to validate each answer, in the same question, with different values.
Subquestion 1: must accept only numbers 0, 2, 5, 14
Subquestion 2: must accept only numbers 7, 10, 53, 140
Subquestion 3: must accept only numbers 5, 6, 22, 30
As you can see, each subquestion is to be validatated by a list of numbers with no relations between them. I tried to do this with a regex code put in the relevance field of the subquestion. Didn't worked. I tried to edit the .lss archive, introducing the tag <preg>regex</preg> after the subquestion id, and nothing. Is there ay way to do this?
Thanks in advance, guys.
I have a multiple answer numeric question and need to validate each answer, in the same question, with different values.
Subquestion 1: must accept only numbers 0, 2, 5, 14
Subquestion 2: must accept only numbers 7, 10, 53, 140
Subquestion 3: must accept only numbers 5, 6, 22, 30
As you can see, each subquestion is to be validatated by a list of numbers with no relations between them. I tried to do this with a regex code put in the relevance field of the subquestion. Didn't worked. I tried to edit the .lss archive, introducing the tag <preg>regex</preg> after the subquestion id, and nothing. Is there ay way to do this?
Thanks in advance, guys.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
8 years 2 weeks ago #134103
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 Differents validations for differents subquestions in a numeric multiple answer
There is no validation for sub-questions. I would use 3 dropdown type questions.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- helviobrito
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 0
8 years 2 weeks ago #134109
by helviobrito
Replied by helviobrito on topic Differents validations for differents subquestions in a numeric multiple answer
Thank you for the suggestion. But I solved the task in another way.
Since the question must be entered by typing in the numeric fields due to the particular survey operation and design, I changed the multiple input numeric subquestions to numeric questions. Then I used regex codes in the validation field of each one.
Eg.: Q1 should accept only 0, 3, 7 10 e 14. The regex /^([3|7|0]|10|14)$/ do the job and control the input.
Since the question must be entered by typing in the numeric fields due to the particular survey operation and design, I changed the multiple input numeric subquestions to numeric questions. Then I used regex codes in the validation field of each one.
Eg.: Q1 should accept only 0, 3, 7 10 e 14. The regex /^([3|7|0]|10|14)$/ do the job and control the input.
The topic has been locked.