-
MMark Tanaka
Which masked letter do I use for a number which can be a blank? For example, if a currency value input is requested, "#,###,###" will not allow 200,000, or 10,000. By the way, I don't want to show preceding commas such as in ',10,000' for an input of '10000'.
-
Sheena JotForm SupportHi Mark,
Thanks for reaching out to Jotform Support. With the input masking feature in Jotform, you use specific characters to control what users can enter:
- # masks numbers (digits only)
- @ masks letters
- * masks letters and numbers
For your case, where you want to allow numbers like 200,000 or 10,000 but also allow blanks, and avoid showing preceding commas such as ',10,000', the standard mask like "#,###,###" will not work because it expects all positions to be filled. Unfortunately, Jotform's input mask does not support optional numeric positions directly in the mask to allow blanks in between or before numbers without showing commas.One workaround is to use a Short Text field with input mask enabled and use the # mask for numbers, but you may need to handle formatting and validation with custom scripts or calculations outside the mask.
Alternatively, you can allow users to enter numbers without commas and then format the number using calculations or integrations after submission. You can add the commaSeparate() function in the Form Calculation widget to format numbers with comma separators for easier readability of dollar amounts. Here’s how to do it:
- In Form Builder, click on the widget's wand icon to open its properties.
- Click on f(x) icon and add the fields inside the commaSeparate() function.
- Click on Save and you're done.
Result:
Give it a try and let us know if you need any help.
Your Reply
Something Went Wrong
An error occurred while generating the AI response. Please try again!