How do I add commas & currency $ ?

  • freedomoftime
    Asked on February 23, 2021 at 4:29 PM

    Hi there.

    I'm not sure if my 1st submission went through or not. I need a bunch of these boxes to convert to currency showing the $ sign at the beginning once the formula computes and I also want it to show the commas in the dollar amounts.

    Please help show me how or just do it. The link is attached and a screenshot.


    Buddy Buck - freedomoftime@gmail.com

    USERNAME: freedomoftime

    Jotform Thread 2919652 Screenshot
  • Jed_C
    Replied on February 23, 2021 at 10:24 PM

    For the dollar sign, you can add the $ symbol in the form calculation settings.

    Here's how:

    1614136794 6035c5dac4bab dollar sign Screenshot 10

    and for the comma, you can add the commaSeparate() formula. Please refer to my screencast below.

    1614137029 6035c6c5178b8 comma Screenshot 21

  • freedomoftime
    Replied on February 24, 2021 at 2:15 AM

    Jed you are the man!!

    That is eXactly what I needed!


    Last thing...... How do I make $ and the commas in the field labeled: AVERAGE HOME PRICE.


    This one isn't one of the calculation widget ones... it's a standard field.


    THANKS IN ADVANCE!!

  • Mike_G JotForm Support
    Replied on February 24, 2021 at 7:39 AM

    Based on my understanding of your form, respondents will enter a value in the AVERAGE HOME PRICE field. We would like to apologize for any inconvenience. I'm afraid that there is no option to automatically put a "dollar sign" or comma separator on the respondent's input on a form field. You can check the Input mask feature of a field, however, the input should always have the exact same number of characters for it to work.

    Reference Guide: Getting-started-with-the-basics-of-input-masking

    Also, calculated results or results inserted in another field using conditions or the Form Calculation widget can be comma-separated using the commaSeparate() Math function.

    Reference Guide: Math-function-reference: commaSeparate

    Feel free to let us know if you need any further assistance.

  • freedomoftime
    Replied on February 24, 2021 at 10:43 AM

    There will always be 6 digits in the average home price field. Does that help?


    They might type: 450000 and I want it to automatically change to $450,000.


    Is that possible now that you know it will always be 6 characters (numbers)?

  • Gaetan_B
    Replied on February 24, 2021 at 3:37 PM

    Hi,

    It can work, but not directly with the field itself.


    This transformation would have to take one field as an input, but it will have to output the result in a different field.

    It is not possible to do the transformation and to feed it back to the same field as it would create an infinite loop.


    Hope this helps.

    Do not hesitate to reach out if you need further assistance.

  • freedomoftime
    Replied on February 24, 2021 at 5:01 PM

    Dang it.... I'm SOOOOOO close to having this work and look perfect. What other ideas do you have? What would you do?


    Thanks!!


    Buddy Buck

  • Mike_G JotForm Support
    Replied on February 24, 2021 at 7:16 PM

    I would like to apologize for any inconvenience. There is actually a workaround that could meet your requirements since you mentioned that

    "There will always be 6 digits in the average home price field."

    The  AVERAGE HOME PRICE field is a Short Text field and you can enable its Input Mask feature to meet your requirements.

    1614211905 6036eb41aac6c zt210224 191048 Screenshot 10

    Here's how it works:

    1614212047 6036ebcfa951c zt210224 191256 Screenshot 21

    I just would like to add that, after you set up the Input Mask of the field, the field will require that you fulfill the input mask or it will give an error, as also shown in my screenshot above.

    Reference Guide: Getting-started-with-the-basics-of-input-masking

    Please give it a try and let us know if you need any further assistance.

  • Mike_G JotForm Support
    Replied on February 24, 2021 at 7:19 PM

    Here is, by the way, the Input Mask I have used:

    $###,###

    And here's a cloned version of your form that I used in my screenshot above: https://form.jotform.com/210543260230944

    Feel free to let us know if you need any further assistance.

  • freedomoftime
    Replied on February 24, 2021 at 8:12 PM

    Awesome, it worked!! We're done here. Thanks team.