Real-time show "Num of characters left" for text field (i.e. character counter)

More
4 years 4 months ago #117583 by kmanapp
To assist user aware how many words they can type in the text field, I would like to know if LimeSurvey can have some build-in function to enable such character counter function. Or, if don't have such function, how can I customize so as to enable it?

Thanks.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
4 years 4 months ago #117589 by DenisChenu
In help of the question :
"You use {strlen(self)} caracter"

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: kmanapp

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #155967 by blocka
This there an equivalent for this that would let me show the number of words left, instead of characters?

I'm using this as the validation value:

/^[-\w]+(?:\W+[-\w]+){0,199}\W*$/

Please Log in or Create an account to join the conversation.

More
1 month 4 days ago #185520 by Mazi

blocka wrote: This there an equivalent for this that would let me show the number of words left


Have a look at this (" How to count the number of characters entered at a Limesurvey text question ") example. You can modify it according to your needs. If you limit is 200 characters you can replace {count(self.NAOK)} with {200 - count(self.NAOK)} and use a help text like "There are {count(self.NAOK)} with {200 - count(self.NAOK)} characters left."

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!