Sliders with calculated result widget: How to separate numbers using a comma?

  • leefuhr
    Asked on May 14, 2016 at 12:03 AM
    The second thing I'd like to solve for is getting commas into that result number, so that "$174720" instead looks like "$174,720". Any leads there?
  • Kiran Support Team Lead
    Replied on May 14, 2016 at 1:24 AM

    Unfortunately, there is no way to format the number to currency format using CSS at the moment. It is required to use Javascript to format the number in the required format. However, injection of javascript is not allowed to use with JotForms due to security related issues. Since there is no option to format the number in the widget, let me forward the request to our backend team to evaluate the feature. We cannot promise that the feature will be implemented or any ETA at the moment. Once we have any update, you'll be posted here.

  • leefuhr
    Replied on May 16, 2016 at 2:05 PM

    I might be able to inject the JS in Squarespace, where I'm embedding the JotForm. Could you provide any guidance about what JS I might use and how to get it to target this number? Basically some instructions for a total JS noob like me…

    That'd get me through for now until the feature is built in to JotForm. 

    Thanks so much!

  • Mike
    Replied on May 16, 2016 at 3:45 PM

    We do not allow JS injections due to security reasons. Also, most of our widgets are being loaded in isolated iframes, so they are not editable.

    As an alternative, you may consider forwarding calculated value into a Form Calculation widget field. It is possible to use a commaSeparate function within that widget, and style it via form designer.

    Sliders with calculated result widget: How to separate numbers using a comma? Image 1 Screenshot 20