Add a dollar sign to a sliding scale question | XM Community
Skip to main content
Solved

Add a dollar sign to a sliding scale question

  • March 2, 2025
  • 1 reply
  • 20 views

Forum|alt.badge.img
I would like to add a $ sign to the scale so that people know it is $0-$20. How do I do this?

 

Best answer by vgayraud

Hi,

You can add this to your question’s custom javascript:

Qualtrics.SurveyEngine.addOnReady(function () {
  const ulElement = document.querySelector('#' + this.questionId + ' .numbers') || document.querySelector('#question-' + this.questionId + ' .numbers');
  if (ulElement) {
    const listItems = ulElement.querySelectorAll('li');
    listItems.forEach(li => {
      li.textContent = '$' + li.textContent.trim();
    });
  }
});

 

View original

1 reply

vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 361 replies
  • Answer
  • March 3, 2025

Hi,

You can add this to your question’s custom javascript:

Qualtrics.SurveyEngine.addOnReady(function () {
  const ulElement = document.querySelector('#' + this.questionId + ' .numbers') || document.querySelector('#question-' + this.questionId + ' .numbers');
  if (ulElement) {
    const listItems = ulElement.querySelectorAll('li');
    listItems.forEach(li => {
      li.textContent = '$' + li.textContent.trim();
    });
  }
});

 


Leave a Reply