- blakefamAsked on April 24, 2016 at 11:29 PM
I have managed to set up a content mask for cost values in my form at https://www.jotform.com//?formID=60827059885873
However if the value entered needs to be only a 'small amount, zeros need to be included to fill the input. eg. $004.57
Is there a way I can retain the purpose of the input mask without the need to include the zeros before other characters this allowing $4.57 to be input as in this example?
This is a re-post of a comment on How to Set Content Mask on a Form Field Based on Another Field Input
- JotForm Supportashwin_dAnswered on April 25, 2016 at 06:44 AM
"Input Mask" is designed to fill the exact format.
I would suggest you to please take a look at our "Masked Input" widget and that should fit into your requirement. You have to just configure the number of decimal places. Please check the screenshot below:
Hope this helps.
Do get back to us if you have any questions.
- blakefamAnswered on April 25, 2016 at 06:44 PMMany thanks, however the challenge I am having is accommodating different
ranges of costs.
Using an input mask such as $###.## requires each # to be filled,
irrespective of the value I am wanting to display.
1. If I want to show a cost of $127.65 then the input mask works as desired
as each # is occupied by a value.
2. If I want to show a cost of just $5.78, the input mask means I must
input 005.78 meaning it displays $005.78
Using the Mask Input wizard does not appear to address this issue.
I trust this explanation more clearly outlines my challenge with using masks
Thank you in anticipation of your efforts.
- JotForm Supportashwin_dAnswered on April 25, 2016 at 10:33 PM
I understood your issue now. Please be noted that if you mask the input as ###.##, textbox will always expect you to input the data in the exact same format including the number of characters as well.
I am not sure if there is any workaround available to achieve your requirement. I will do few tests and get back to you if I am able to find any workaround.
- bnoreenAnswered on August 30, 2016 at 10:14 AM
I'm not sure if there's been an update, but the masked input widget works well now for currency values. If you leave the default settings (no pattern, 2 decimal places, prefix $) it behaves as you would expect, simply moving the digits to the left as you type.
I agree there should be a more self-explanatory way to accept dollar amounts, but thanks to this forum I found something that works. Now I just have to remember it exists. I'd like to suggest this widget become a standard feature in place of the input mask tool in the future.
- JotForm SupportNik_CAnswered on August 30, 2016 at 12:16 PM
Thank you for your suggestion and feedback, we appreciate that.
We'll keep in mind your suggestion for future updates of Masked input widget.
Thank you again!