and some are blank on load for calculation widget

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

    Why do some fields have $0 and some are blank on load for calculation widget

    Asked by ragetracks on April 17, 2017 at 06:08 PM

    Hello,

    Some of my fields show $0 and some do not. I am using the calculation widget.

    https://form.jotformpro.com/41815003961954

    Only the first row has inputs from the user, and the rest calculate based off the first row. However the fields after the first row either have $0 to start or are blank. I need to get it consistent. All the calculations are correct, just the problem is why are some $0 and some are blank?

    Sorry it is mostly white I am embedding on a website with colored background.

    On the form you can see some fields are blank and some are $0.  The blank fields work the same way as the ones that have the $0 showing.

    I am trying to get them all consistent so either $0 appears or it is blank. But I am not sure what is causing some to appear as $0 and some as blank.

    Thanks

  • Profile Image
    JotForm Support

    Answered by jonathan on April 17, 2017 at 09:58 PM

    The default zero(0) value was coming from the properties of the widget in Default Result option.

    You can remove the zero(0) value so it will become an empty input box.

  • Profile Image

    Answered by ragetracks on April 20, 2017 at 12:08 PM

    Thank you :)

  • Profile Image

    Answered by ragetracks on April 20, 2017 at 12:20 PM

    Hi Jon,

     

    I removed the default results for all of them, but the problem is still there.  There are some fields that are blank and some that are 0.

  • Profile Image

    Answered by ragetracks on April 20, 2017 at 03:12 PM

    some have $0 and some are blank. It's not the default result because all the fields have that blank.

     

  • Profile Image

    Answered by ragetracks on April 20, 2017 at 03:46 PM

    Also I want to mention, it cannot be the default 0 because the fields are $0 not 0.

    Looking forward to hearing how I can fix this issue.

    Thanks

  • Profile Image

    Answered by KadeJM on April 20, 2017 at 04:21 PM

    After some careful investigating of your issue I believe I have found the cause of this problem.

    Looking at your form at first I could indeed see the empty and filled calculations:

    At first this wasn't making much sense to me until I realized you have some formatting issues that existed in your calculations. The ones that work are the one's that are showing the number and dollar sign because those are correct. But, the ones that are blank are incorrect because it's expecting a String to be calculated per the formula you are using where one doesn't exist so this breaks your calculation and the result is nothing happens or in your case it's blank.

     

    I updated this by clicking on the $ to turn it grey and that tells the formula that you are using the string in your calculation so now you can see this fixed in the updated example below:

    My Updated Test Copy of your Form: https://form.jotformpro.com/71094939314966 

  • Profile Image

    Answered by ragetracks on April 20, 2017 at 04:56 PM

    Hi Kade,

    I appreciate the careful investigation.

     

    However, If you look at a row (for example) decrease to ineffective, they are all blank. From your reply, it sounds like they are 'strings" but when I got to look at the formula, they are gray and not strings.

     

    None of my calculations have brown/beige backgrounds so they are not strings.

     

     

  • Profile Image
    JotForm Support

    Answered by jonathan on April 20, 2017 at 06:20 PM

    I see a difference on the formula to what was working on KadeJM's form  versus the one not working on your form.

    Kade's formula 

     

    Your calculation formula

     

    For that specific calculation widget I showed (Q2 2017 Implied Total Sales...), can you please try first totally removing the formula, and then run the configuration wizard again and recreate it.

    Let us see if this process fixes the output already. Do let us know how it goes or if still not working.

    Thank you.