Formatting piped text | Experience Community
Skip to main content
Solved

Formatting piped text

  • Jan 7, 2019 2:45 PM UTC
  • 6 replies
  • 112 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.
View original

6 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • Jan 7, 2019 7:06 PM UTC
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
  • Jan 9, 2019 5:02 PM UTC
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 ●●
  • Jul 15, 2020 7:48 PM UTC

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 ●●●●●●●●
  • Jul 15, 2020 8:30 PM UTC

Forum|alt.badge.img+8
  • Level 2 ●●
  • Jul 15, 2020 8:45 PM UTC

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 ●●●●●●●●
  • Jul 15, 2020 9:28 PM UTC

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.