Hi everyone, contrarily to many posts that I’ve seen in the forum, I would like to add/reduce character limit to a TEXT question. Does anyone know if it is possible to do that and how?
My interest is to have an answer in the text question that is limited to maximum 8-10 words (max 70 characters with spaces, or 67 without spaces).
Thanks a lot for your support and for sharing experiences with a fairly new user!
Hello,
You probably can do this with a combination of regex and string-length.
I am afraid there n=is no simple possibility to count “words”.
For better support, it would be good if you can specify more in detail what exactly you will allow also. For example: hi? hi hi hi? #hi? … hi hi? hi?
Can you also tell us which KoBo tool (KoBoCollect or Enketo) and server you use.:
To give you an idea, a combined constraint:
string-length(normalize-space(.)) <= 67 or regex( ., ‘^.[a-zA-Z]{3,}.$’)
would restrict to
Input of maximal 67 length, after leading, trailing and double blanks removed, and at least one 3 letter word (anywhere).