Welcome to the LimeSurvey Community Forum

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

Max Chars for textArea in 'List with comment'

  • BITCNI
  • BITCNI's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 3 months ago #232980 by BITCNI
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 3.28.34
Own server or LimeSurvey hosting:LS
Survey theme/template: extends_vanilla
==================
We want to limit the number of characters a person can enter into a Comments box in the 'List with Comment' type question.  I know this has been asked before, and I found a thread that said we could use the following in the Question validation equation section, but I tried it, and all it said was that the Survey question hadn't been filled in.
Our question is MR06 (ID:3093), so I put the following in the "Question validation equation" area:{strlen(MR06_comment.NAOK)} < 100, and I put this in the Question Validation tip:You have entered {strlen(MR06_comment.NAOK)} of 100 characters. However, as stated, it doesn't say "You have entered x of 100 characters"; it just says that one of the questions hasn't been completed correctly.

Have I done something wrong here?

TIA for any help

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago - 2 years 3 months ago #232981 by Joffm
Hi,
there are a few errors:
1. {strlen(MR06_comment.NAOK)} < 100
a. Remove the  curly brackets!
They are displayed here already to show this
 
b. Even with necessary curly brackets your equation would be wrong.
The equation is "Stringlength less than 100". So you have to surround the whole equation 
{strlen(MR06_comment.NAOK) < 100}

As said, validation equation without curly brackets.

Then it should be fine - if there isn't another mistake.




Therefore you should send us this question as lss export.
Copy the survey
Remove all groups/questions except this
send it as lss export.

Joffm


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 3 months ago by Joffm.
The following user(s) said Thank You: BITCNI

Please Log in to join the conversation.

  • BITCNI
  • BITCNI's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 3 months ago #232985 by BITCNI
Thanks for this. I think I've got it working, so I appreciate your help. If I have other questions, I'll post again.
Have a great evening, and thanks again.

Please Log in to join the conversation.

  • BITCNI
  • BITCNI's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 3 months ago #233025 by BITCNI
Hello again.
Could you help me with one more question related to this, please?
Is it possible to change the text from "Please enter your comment here:" with something more specific, eg, "Please ensure you have answered the preceding question before adding comments" or something?
Thank you :)

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233027 by Joffm
Yes,
there are a few thread about this in the forum.
[url] forums.limesurvey.org/forum/design-issue...ent-box-label#189952 [/url]
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • BITCNI
  • BITCNI's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 3 months ago #233039 by BITCNI
So sorry; I should've checked first. Apologies. Thank you so much. This worked great.
Again, thanks so much for your help and patience.

<script>
$(function() {
$("label[for=answer{SGQ}comment].control-label").text("Please provide detail of how you meet the option you have selected.");
});
</script>

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose