Javascript: How to change the button formatting for a single question only | XM Community
Skip to main content
Hello everyone!



I am trying to change how the scale buttons look in multiple choice questions. I am aware that I can change the theme in order to do that. However, my problem is that I want to change the style for a single question only.



My current theme has the following style:

!



It is great for the most part of my survey. However, for a single question, I want to have them as following:

!



I was hoping to find javascript for that.



I appreciate your time and help!



Best,

Ezgi
Hi @ezgiulusoy ,

I think pure CSS is the best choice for this. In case you'd use JavaScript, you could see the original appearance for a moment.

You'll need to get ID of your question for this declaration. You can find it for example using the inspector.

The declaration will look somehow like this:



#QID3 label.SingleAnswer

{background: blue;}



UPDATE: I've overlooked in what way do you want to change the question. To be honest, I don't know how to do exactly this. I'm afraid it could be that tricky, that it might be easier to create your own HTML code for this question and then send the value to embedded data field.

Leave a Reply