Inserting calculation into a field with Input mask causes issues

  • awlmc
    Asked on October 27, 2015 at 9: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.

     

    Jotform Thread 690849 Screenshot
  • Bryan
    Replied 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).

     

    Inserting calculation into a field with Input mask causes issues Image 1 Screenshot 40

     

    Inserting calculation into a field with Input mask causes issues Image 2 Screenshot 51

     

    Inserting calculation into a field with Input mask causes issues Image 3 Screenshot 62

  • Ben
    Replied on October 27, 2015 at 2: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:

    Inserting calculation into a field with Input mask causes issues Image 1 Screenshot 20

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

  • awlmc
    Replied on October 27, 2015 at 5: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!

  • jonathan
    Replied on October 27, 2015 at 9: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

    Inserting calculation into a field with Input mask causes issues Image 1 Screenshot 40

     

    Inserting calculation into a field with Input mask causes issues Image 2 Screenshot 51

     

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

    Inserting calculation into a field with Input mask causes issues Image 3 Screenshot 62

     

     

    Let us know if you need further assistance.

  • awlmc
    Replied on October 28, 2015 at 12:45 AM
    Did that, did not make a difference.
    ...
  • Bryan
    Replied on October 28, 2015 at 1: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. 

    Inserting calculation into a field with Input mask causes issues Image 1 Screenshot 30

     

    Tick the checkbox Show empty decimal places

    Inserting calculation into a field with Input mask causes issues Image 2 Screenshot 41

  • awlmc
    Replied 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!

  • David JotForm Support
    Replied on October 28, 2015 at 2: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.

  • awlmc
    Replied on November 3, 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

  • David JotForm Support
    Replied on November 3, 2015 at 12:22 PM

    I checked your form and on my end it shows the "$" in front of the donation value:

    Inserting calculation into a field with Input mask causes issues Image 1 Screenshot 20

    I checked in a few browsers and it showed in each one.  Is it still not showing on your end?

  • David JotForm Support
    Replied on November 3, 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