Is there a way to format the number field?

  • piperrandomfarms
    Asked on August 7, 2017 at 9:55 AM

    Is it possible to format the number field so that it formats with a comma (ex. 2,000 vs. 2000)?  I have a number field calculating a total dollar amount, and would prefer a comma placement when over 999.

  • aubreybourke
    Replied on August 7, 2017 at 10:06 AM

    Yes its possible to do this with the Masked Input Widget. Search for it on the left. And drag it onto your form:

    Is there a way to format the number field? Image 1 Screenshot 30

    Then click on the wizard (magic wand icon). And configure your widget how you like. You will need to add a comma for thousandths separator.

    Is there a way to format the number field? Image 2 Screenshot 41

     

  • piperrandomfarms
    Replied on August 7, 2017 at 10:18 AM

    Thanks for that!  Unfortunately, I need to have this field calculated, and it seems that the widget won't work with the calculation settings.

  • aubreybourke
    Replied on August 7, 2017 at 10:54 AM

    Why don't you use a payment integration?

    I have made a demo for you:

    https://form.jotformpro.com/72184001459957

    You can view or clone a copy. Then modify it as you like:

    How to Clone an Existing Form from a URL

  • piperrandomfarms
    Replied on August 7, 2017 at 11:01 AM

    I love this, but the problem with payment integration is two-fold.  First, I'd need the same payment fields for the check payment option.  Second, we currently redirect to our Patron/Salesforce donation page for credit card payments.  While I know JotForm integrates with Salesforce, I've been told by the folks at Patron that the integration doesn't work well with them as your integration doesn't recognize custom objects.

  • AIDAN
    Replied on August 7, 2017 at 1:16 PM

    One solution to consider is using the commaSeparate() function which you can access through the options button in the widget wizard:

    Is there a way to format the number field? Image 1 Screenshot 30

    On the math functions tab you scroll down until you find find that function:

    Is there a way to format the number field? Image 2 Screenshot 41

    Please note that all your calculations should be inside the function parenthesis in order to have this working properly.

    I hope this helps. If you need further assistance please let us know. Thank you.

  • piperrandomfarms
    Replied on August 7, 2017 at 2:26 PM

    PERFECT!  Thank you!!