Hiya!
Thank you for adding me to the Qualtrics community!
In one question on my survey I need to set a word limits but I can only see the characters limits (left side - add validation ). Does someone know how can I set up a words limit instead of a character?
See this thread and I think it will answer your question - it addresses how to add a word counter and one of the comments included how to add a limit.
https://community.qualtrics.com/XMcommunity/discussion/144/how-do-i-show-the-number-of-words-in-text-entry-boxes-i-have-several-on-the-page
It is also possible to use JS to prevent the respondent from typing more that the allotted number of words.
https://community.qualtrics.com/XMcommunity/discussion/comment/44583#Comment_44583Do you have any suggestions on how can I do that?
https://community.qualtrics.com/XMcommunity/discussion/comment/44589#Comment_44589I've updated the gist referenced in the other thread to optionally limit the number of words:
Qualtrics: Display count of words in a text entry box. Option to limit number of words. #qualtrics #js #jq #text #count #limit
https://community.qualtrics.com/XMcommunity/discussion/comment/44592#Comment_44592I can't make it work, maybe is something that I am doing wrong, I did update the 0 with my words limit that is 300.
https://community.qualtrics.com/XMcommunity/discussion/comment/44604#Comment_44604It works for me. You'll have to provide more specifics if you want help.
https://community.qualtrics.com/XMcommunity/discussion/comment/44617#Comment_44617Hi Tom,
Thank you for your help.
After I have selected the question, I go on JS, I have pasted the gist, and on var maxWords = I did write the words limit. I then save it and try with the preview mode but no luck
- https://community.qualtrics.com/XMcommunity/discussion/comment/44646#Comment_44646What type of question did you add it to? Text Entry or some other type?
- If Text Entry, is it set to essay box or something else?
- Does the word count display on the bottom right?
- If it does display, does it increment when you type words?
- Have you looked at the console (right click/Inspect/Console) to see if there are any errors?
Here is what it should look like (I added max words to the display):
- https://community.qualtrics.com/XMcommunity/discussion/comment/44653#Comment_44653It is a text entry question
- and it is set as Essay text box
- The word count is displayed on the bottom right
- and it does increment when I do write words - it does not appear like your visual example 1/5
- NO I have not I just done it and it says failed to load resource...
https://community.qualtrics.com/XMcommunity/discussion/comment/44662#Comment_44662The extra info helped. For some reason, it didn't like the && condition once the number of words increased into the hundreds (somewhere between 200 and 300). I imagine it is a timing issue. Splitting it into two conditions fixed it. Copy the updated gist and try it.
Thank you for your help Tom! It works perfectly now!
https://community.qualtrics.com/XMcommunity/discussion/comment/44653#Comment_44653
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.