How to ensure that a monetary amount is entered in the correct format?

  • KeyshaunSmith
    Asked on February 23, 2016 at 10:16 PM

    People will be entering monetary amounts into a text box of my form, I would like to ensure that the amount is being entered in the following fashion: $10.00  I tried an input mask but realized that people will entering differing amounts, some may be entering $25.00 while other may be entering $100.00 so this mask was not able to cover both variables. 

     

    Any ideas?

     

    Thanks! 

  • beril JotForm UI Developer
    Replied on February 24, 2016 at 7:25 AM

    I've cloned and checked your form. I am not able to change the prices on my side. I assume that you've mentioned about the Total Cash Enclosed field.

     

    How to ensure that a monetary amount is entered in the correct format? Image 1 Screenshot 30

    If you want to allow specific amount you can try to use radio button instead of text box field.

    How to ensure that a monetary amount is entered in the correct format? Image 2 Screenshot 41

     

  • KeyshaunSmith
    Replied on February 24, 2016 at 9:00 AM

    Hello! There is only one field in which the respondent will be imputing there own monetary amount. that is the total cash enclosed field. They are able to enter any amount they would like for that field but I need it to follow the same format $20.00 or $100.00 I can't figure out how to validate it so that both options are available.

     

    Thanks! 

  • beril JotForm UI Developer
    Replied on February 24, 2016 at 11:16 AM

     If I understand your request correctly you want to allow your customers enter two different values. For example, they can enter both 100$ and 20$.

    First of all we will add a radio button and text box field on our form. Then we will create our condition to add input mask for both values.

    How to ensure that a monetary amount is entered in the correct format? Image 1 Screenshot 70

     

    Here is how to do this:

    1) Click on Conditions.

    How to ensure that a monetary amount is entered in the correct format? Image 2 Screenshot 81

    2) Choose ENABLE / REQUIRE FIELD.

    How to ensure that a monetary amount is entered in the correct format? Image 3 Screenshot 92

     

    3) Make the arrangement as you see below for your first value.

    How to ensure that a monetary amount is entered in the correct format? Image 4 Screenshot 103

    4) Make the arrangement as you see below for your second value.How to ensure that a monetary amount is entered in the correct format? Image 5 Screenshot 114

    Here is how it works:

    How to ensure that a monetary amount is entered in the correct format? Image 6 Screenshot 125

  • KeyshaunSmith
    Replied on February 24, 2016 at 11:48 AM

    This is not the case either, the respondent needs to be able to input ANY monetary amount in the correct monetary format (dollar sign and period). The format is where i am having an issue I need to ensure that they submit it so that it looks like $10.00 or $50.00 or $100.00 or $224.00 these are all just examples.

  • Nik_C
    Replied on February 24, 2016 at 3:14 PM

    Hi, you can use our Masked input widget to achieve your goal.

    http://widgets.jotform.com/widget/masked_input

    I provided a guide for you on how to set up masked input widget.

    How to ensure that a monetary amount is entered in the correct format? Image 1 Screenshot 30

    As you can see, sign is added automatically on widget adding. 

    We format our input mask by entering 9 where we want numbers to be entered. Everything else is considered a mask. You can set precision, and symbol for decimal places. you should leave that as is to achieve what you want. Last setting is for thousands separator you should leave default value.

    In my guide i'm setting up mask for values under 100$.

    For any value that you want to be formated as currency you just need to delete all formatting from field. So instead 99.99 field should be empty.

    How to ensure that a monetary amount is entered in the correct format? Image 2 Screenshot 41

    You can also set if your field should allow numbers only, Prefix for field is by default.

    You can also set default value for field to be shown before user enters anything. 

    If you want you can also set an option to set suffix to your input mask.

     

    Please let me know if this works for you. 

     

    Best regards.

  • KeyshaunSmith
    Replied on February 24, 2016 at 4:39 PM

    Hello! 

    The issue with the mask is that people will be entering vaules both above and below $100.00 I can't create a mask for that.

  • KeyshaunSmith
    Replied on March 1, 2016 at 6:47 PM

    Any solution for this problem?

  • Ashwin JotForm Support
    Replied on March 1, 2016 at 10:19 PM

    Hello KeyshaunSmith,

    You can still use "Masked Input" widget to allow users to input any numbers. It will accept any numbers. Please check the screenshot below:

    How to ensure that a monetary amount is entered in the correct format? Image 1 Screenshot 20

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!