- Posts: 10109
- Thank you received: 3595
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Minimum characters in Input
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
7 years 6 months ago #143371
by tpartner
And something like this in the Question validation tip fields:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Minimum characters in Input
That sounds like a bug, please file a bug report.I see. Just the "danger text (red one)" not turns to green color. But I can step the next page.
Place something like this in the Question validation equation field for all questions (adjusting the question codes as necessary):If I've five question and I'd like to one can write different asnwers for every question.
Code:
unique(Q1, Q2, Q3, Q4, Q5)
And something like this in the Question validation tip fields:
Code:
{if(unique(Q1, Q2, Q3, Q4, Q5), '', 'Answers must be unique.')}
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: holch
The topic has been locked.
- alchv2018
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
5 years 6 months ago #175166
by alchv2018
Replied by alchv2018 on topic Minimum characters in Input
Dear Lime professionals, I have exactly the same issue is in the topics that opens this thread: how can I set up MINIMUM length for the answers in long and huge text fields.
I have tried the recommended "strlen(this) > 100" in the Question validation equation and id does not work for me.
Could you provide with some further advise on the issue? E.g. Should I replace "this" with any other magic word? What about spaces in the equation? etc...
Thank you very much in advance.
alchv
I have tried the recommended "strlen(this) > 100" in the Question validation equation and id does not work for me.
Could you provide with some further advise on the issue? E.g. Should I replace "this" with any other magic word? What about spaces in the equation? etc...
Thank you very much in advance.
alchv
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 6 months ago #175173
by DenisChenu
Else : you can use strlen(self) for a single question
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 Minimum characters in Input
Limesurvey version and screenshot of settings (where did you put exactly this setting).alchv2018 wrote: I have tried the recommended "strlen(this) > 100" in the Question validation equation and id does not work for me.
Else : you can use strlen(self) for a single question
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.
Attachments:
The topic has been locked.
- alchv2018
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
5 years 6 months ago #175175
by alchv2018
Replied by alchv2018 on topic Minimum characters in Input
Thanks for your quick reply, Denis!
Although it is not clear to me why you suggest putting the equation into "sub-question" line, I have tried it this way and it still does not work for me...
The validation rule you have suggested works great!
But... It does not prevent from the submission of a too short passage. My idea is to request a respondent to write some meaningful text in the field by "imposing" the minimum number of characters for the entered text.
Although it is not clear to me why you suggest putting the equation into "sub-question" line, I have tried it this way and it still does not work for me...
The validation rule you have suggested works great!
But... It does not prevent from the submission of a too short passage. My idea is to request a respondent to write some meaningful text in the field by "imposing" the minimum number of characters for the entered text.
The topic has been locked.
- alchv2018
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
5 years 6 months ago #175182
by alchv2018
Replied by alchv2018 on topic Minimum characters in Input
Dear Denis,
Now I have tried your suggested solution for the whole survey preview - it works perfectly and exactly the way I wanted! Thus - many thanks for your great help.
In my previous mail I referred to only the PARTIAL preview of the section instead of the survey as a whole.
Hi life LimeSurvey!
best
alchv
Now I have tried your suggested solution for the whole survey preview - it works perfectly and exactly the way I wanted! Thus - many thanks for your great help.
In my previous mail I referred to only the PARTIAL preview of the section instead of the survey as a whole.
Hi life LimeSurvey!
best
alchv
The topic has been locked.