Welcome to the LimeSurvey Community Forum

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

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

  • kmanapp
  • kmanapp's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 weeks 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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks 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 , plugin development .
I don't answer to private message.
The following user(s) said Thank You: kmanapp
The topic has been locked.
More
6 years 9 months 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*$/
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
4 years 9 months 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: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose