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.


  • Profile Image

    Inserting calculation into a field with Input mask causes issues

    Asked by awlmc on October 27, 2015 at 09:55 AM

    Hello,

    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.

     

    Page URL:
    https://form.jotform.com/52883734116156

    Screenshot
    input mask mask currency quantity donation
  • Profile Image

    Answered by Bryan  on October 27, 2015 at 11:35 AM

    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).

     

     

     

  • Profile Image

    Answered by Ben on October 27, 2015 at 02:22 PM

    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 :)

  • Profile Image

    Answered by awlmc on October 27, 2015 at 05:42 PM

    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!

  • Profile Image
    JotForm Support

    Answered by jonathan on October 27, 2015 at 09:47 PM

    Hi,

    You can enable the decimal digits option in the calculation condition.

    See the images below where you can set it on 2 conditions

     

     

    You can also clone this form https://form.jotform.com/52998308159975?

     

     

    Let us know if you need further assistance.

  • Profile Image

    Answered by awlmc on October 28, 2015 at 12:45 AM
    Did that, did not make a difference.
    ...
  • Profile Image

    Answered by Bryan  on October 28, 2015 at 01:43 AM

    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

  • Profile Image

    Answered by awlmc on October 28, 2015 at 12:23 PM

    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!

  • Profile Image
    JotForm Support

    Answered by david on October 28, 2015 at 02:30 PM

    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.

  • Profile Image

    Answered by awlmc on November 03, 2015 at 11:15 AM

    Still no dollar sign.  When the quantity is entered the suggested donation amount of $15.00 should show.  It shows 15.00

  • Profile Image
    JotForm Support

    Answered by david on November 03, 2015 at 12:22 PM

    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?

  • Profile Image
    JotForm Support

    Answered by david on November 03, 2015 at 12:52 PM

    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:

    https://form.jotform.com/53065369704964