Does anyone know of some javascript that will either widen the text area or turn off wrapping for statements on slider/star question types? On that note, I'm somewhat of a newbie at custom coding, I'd also really appreciate some instruction on where to put the code in the "edit question javascript" box. 😀 Thanks!
Page 1 / 1
The wrapping thing should be resolved using CSS. Simply add some CSS to your survey to overwrite the default CSS for the slider element you want to prevent from wrapping.
As for the custom coding, click the link to 'JS Question API' under the 'Edit question javascript' box to see some sample code using the API.
As for the custom coding, click the link to 'JS Question API' under the 'Edit question javascript' box to see some sample code using the API.
Thanks, but I think I need a little more hand-holding. Could someone help me with specific code I need? I have experience coding sql, but this is different. Also, do this code need to go in the CSS Editor under the Look & Feel menu? Or still in the "edit question JS" box for that specific question?
> @Julie_130 said: I need a little more hand-holding
Post an example of what is wrapping that you do not want to wrap. The CSS would go under the Look and Feel / Advanced / Add Custom CSS.
Depending on what you need it might simply look like:
.Slider th.ylabel{ white-space: nowrap !important; }
Post an example of what is wrapping that you do not want to wrap. The CSS would go under the Look and Feel / Advanced / Add Custom CSS.
Depending on what you need it might simply look like:
.Slider th.ylabel{ white-space: nowrap !important; }
!
Not sure if you can see that picture (it's stripped on my browser). Ideally, the text would be right-aligned and allow for a longer string of text on one line. Word wrapping is fine , if it makes sense. But the current format only allows 2-3 words on each line.
@Julie_130 Yeah I see what you mean. Add this to you CSS in the Look and Feel:
.Slider th.ylabel{ white-space: nowrap !important; }
.Slider th.ylabel{ white-space: nowrap !important; }
Thanks Patrick! I actually added this code a few days ago and it worked great! The only caveat is sometimes I want the text to wrap into a second line. Is there a way to keep the wrap on, but widen the text area?
Insert a html break tag <br/> if you want to force a break. In most cases there is a separator 'bar' between the labels and the responses you can click and drag left or right to change the label space.
That worked. Thank you for your help!
https://community.qualtrics.com/XMcommunity/discussion/comment/3139#Comment_3139Hello, do you have the code for this? I am in need of the same thing :)
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.