Changing colour of one button in multiple choice question | XM Community
Skip to main content
Solved

Changing colour of one button in multiple choice question

  • March 12, 2022
  • 1 reply
  • 116 views

Forum|alt.badge.img+1

Hello,
I am looking to change the background colour (ex. light gray) to just one button on a multiple choice question (ex. "N/A" option). Does anyone have any pointers on how to do this? Thank you!
multiple choice button colour.jpg

Best answer by Rudi

hi, you could try this:

Qualtrics.SurveyEngine.addOnload(function()
{
let labels = document.getElementsByClassName('LabelContainer') //get the label elements of the questions

labels[labels.length-1].style.backgroundColor='#efefef' //set the background color of the last element




});

Best regards

Rudi

1 reply

Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • Answer
  • March 14, 2022

hi, you could try this:

Qualtrics.SurveyEngine.addOnload(function()
{
let labels = document.getElementsByClassName('LabelContainer') //get the label elements of the questions

labels[labels.length-1].style.backgroundColor='#efefef' //set the background color of the last element




});

Best regards

Rudi