Javascript: How to change the button formatting for a single question only | XM Community
Solved

Javascript: How to change the button formatting for a single question only

  • 15 September 2019
  • 1 reply
  • 41 views

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
icon

Best answer by fleb 1 October 2019, 22:39

View original

1 reply

Userlevel 5
Badge +6
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