What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Inserting calculation into a field with Input mask causes issuesAsked by awlmc on October 27, 2015 at 09:55 AM
I am using conditional logic to populate a total amount. Calendar quantity * suggested donation = total suggested donation. The calculation works until I add an input mask. I am trying to show the total amount as currency.
You could use the currency validation instead to avoid conflicts.
Also, make sure you remove the input mask you put earlier.
Then under the Show Advanced Options in Conditional Wizard, select 2 from the Dropdown menu for Decimal Places in Numerical Results.
But, if you wan't to add a Dollar ($) sign (or any preferred currency), undo the currency validation and simply add "$" in the Conditional Wizard, right before the calculation you did (as the "$" will be evaluated as an error if you still have the currency validation).
Bryan is right above. It is best to add the currency symbol in the last calculation.
To do that, just add it right in front of the calculations being made:
There are other reasons why mask might give you some issues, such as if the numbers you are passing do not match the input mask.
In your case (per screenshots) you would always need to pass 3 digits in order for the mask to be OK with the data passed over.
The solution above mentioned by Bryan (with that single update that he mentioned, but is shown in my screenshot above) you can pass 4 digit numbers just as same as you would pass 1 digit or 2 digit numbers.
And will show you $xy.00 at the end
You can see how it would work by checking out this form: https://form.jotform.com/52995880918980
- You can also clone it to your account by following the steps here: How to Clone an Existing Form from a URL
Do let us know how it goes and if you happen to have any additional questions :)
Thank you! Although I cannot get the decimal and cents to display, the calculation works and displays as currency.
Is there any way to make the 'suggested donation' display the $15.00?
Here's the new link: https://form.jotform.com/awlmc/awlmc-calendar-order-form
Thank you for the quick answers!
Did that, did not make a difference.
You won't see any decimal places on your current form because you forgot to tick the checkbox as suggested as suggested earlier by Jonathan & me. Otherwise, this is what you'll see.
Tick the checkbox Show empty decimal places
Sorry, moving too fast and making too many changes last night. Could have sworn I clicked the show empty decimal places, now I definitely have and it displays properly.
The only thing I haven't been able to get is the suggested donation to display $.
Thank you all for your patience!
I checked your form and it is currently displaying the "$" symbol before the suggested donation amount. Is it still not showing properly on your end? Let us know and we will be happy to have another look.
Still no dollar sign. When the quantity is entered the suggested donation amount of $15.00 should show. It shows 15.00
I checked your form and on my end it shows the "$" in front of the donation value:
I checked in a few browsers and it showed in each one. Is it still not showing on your end?
Number fields can only contain numbers. For the "$" to work for that field, you would need to change to a text box field instead. I setup the same condition in my test form using a text box and it works without issue: