How to configure input mask correctly

  • stormingrobots
    Asked on January 24, 2017 at 2:21 AM

    with $  ####.## : 

    for amount $  520.00

    it shows up as $  520.__

    How can I get to show exactly as $  520.00

  • Charlie
    Replied on January 24, 2017 at 3:59 AM

    Is the value after the decimal point fixed to "00"? If it is, then simply add it in the input mask. 

    How to configure input mask correctly Image 1 Screenshot 20

    If the decimal value is fixated to "00", then you can add it in the input mas. If you want to force users to fill out the whole mask, then enable "Fill Mask Validation". 

    You can also try our "Input Mask" widget, here it is: https://widgets.jotform.com/widget/masked_input 

    If I misunderstood your concern, please do provide more details. 

  • stormingrobots
    Replied on March 14, 2017 at 11:57 AM

    - cannot use $####.00; as it will truncate the decimal places. 

    - On a number field, I cannot get it to dollar sign to display.

    - On a text field with currency field set:  it truncate anything  decimal places if  it is given from a calculated field. Eg.    if   condx ,  put   field1 / field2 into final_field   ( e.g. 525/10 into final_field)  . Then final_field will contain only 52, not 52.5.    The mask does not help.

    So, in the end, if I want : 

    - 5001 / 10  .   If I want the decimal places to show up, I have to use Number field.  

    - if I want "$" to show up, I have to use "Text" field.

    - so I guess the conclusion is that if I want : 

     field = $  500.10 , I will have to use Number field.  Then, download the form and edit the "$" in front all input fields which need the $ sign. 

     

    Am I correct? If not, please let me know the alternative.  

    Also, the Number format widget does not help in this matter either. 

     

     

  • Kevin Support Team Lead
    Replied on March 14, 2017 at 1:26 PM

    You could use calculations to get the value and still include the dollar sign, for example, you need to set up the condition like this: 

    How to configure input mask correctly Image 1 Screenshot 60

    You can also set the number of decimals you want in the result by clicking on the calculation settings: 

    How to configure input mask correctly Image 2 Screenshot 71

    The same can be done with the Form Calculation widget, the only difference is that you do not need to calculation to be triggered upon any action.

    How to configure input mask correctly Image 3 Screenshot 82

    You can also set the number  of decimals in the calculated value: 

    How to configure input mask correctly Image 4 Screenshot 93

    Here's the result you will get from both options:

    How to configure input mask correctly Image 5 Screenshot 104

    Hope this helps.