Hello,
I have a multiple-choice question with 3 answer options. The first one is supposed to be just a text entry box but a) only numbers should be allowed to enter, and b) there should not be anything else but the textbox (so, no label of the answer option). Basically, I want a text entry box with numbers only allowed, and then 2 options with "don't know" and "refuse to answer".
Hope this makes sense and someone can help me.
Thanks a lot!
Page 1 / 1
Make the text of option a to:
...
You can use validation to allow only numbers.
https://www.qualtrics.com/community/discussion/comment/34751#Comment_34751Thanks for your answer but is there another way than just making the text transparent? It looks odd when taking the survey.
On the validation issue, it doesn't let me allow only numbers. In the custom validation option, it only lets me add an error message.
Change style to
"display:none"
Add this line to your JS:
this.getQuestionContainer().querySelector(".TextEntryBox").type = "Number";
Like this?
It still leaves this grey box above the text entry
Thanks, the JS code for the number validation worked!
Oh that! Let the text be anything. Add this to your JS:
this.getQuestionContainer().querySelector(".TextEntryBox").previousElementSibling.hide();
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.