Formatting piped text | XM Community
Skip to main content
Solved

Formatting piped text

  • January 7, 2019
  • 6 replies
  • 69 views

I am reminding participants what they selected on a slider scale in a previous portion of the survey using piped text. I would like to format this piped text by adding a dollar sign and commas to it. Is there a way to do that using custom CSS code?

Best answer by TomG

You can't format a number (e.g. add commas) with CSS. You would have to write JavaScript. For a $ sign you could just put the $ character before your piped text.

6 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • January 7, 2019
You can't format a number (e.g. add commas) with CSS. You would have to write JavaScript. For a $ sign you could just put the $ character before your piped text.

  • Author
  • January 9, 2019
Thank you! That worked for the dollar sign. Do you have java script code for the commas? I don't know java

Forum|alt.badge.img+8
  • Level 2 ●●
  • July 15, 2020

Hi,
Did you ever figure out the formatting with commas and perhaps a decimal (if needed)? It woudl be something like a $ 1,000.00 type of format?
I am in the same need after generating pricing.
Thanks,
Adam


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • July 15, 2020

Forum|alt.badge.img+8
  • Level 2 ●●
  • July 15, 2020

https://www.qualtrics.com/community/discussion/comment/27913#Comment_27913Thanks TomG! Does that require placing something for reference in the header or footer of the survey? Was a little uncertain how the reference is made there.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • July 15, 2020

Yes, you need to load the wnumb script in the header. You can load it from jsdelivr.com and it will create the appropriate script tag for you.