Having issues with calculation when show/hide fields are involved

  • Profile Image
    Asked on August 18, 2017 at 09:10 PM

    I created a new form entitled McClatchey.  I had to recreate the math fields multiple times to get them to work during preview.  Then I added in conditional hiding of fields and they no longer compute correctly.  I already spent way too much time have to recreate the math fields 3 or 4 times each.  Hopefully, someday, all of your functionality will be compatible internally.

  • Profile Image
    Answered on August 19, 2017 at 12:30 AM

    Upon checking your form, I noticed a setting where it sets to clear hidden fields on submit. With this, I suggest that you disable this "clear on submit" setting on your form.

    To do this:

    1) Edit your form and go to Settings 
    2) Click Form Settings
    3) Click the Show More button to expand the other hidden options
    4) Change Clear Hidden Field Values to Don't Clear

    If the problem persists, please let us know.

  • Profile Image
    Answered on August 19, 2017 at 09:01 AM

    I doubt this is the issue since I never once selected submit.  I was just changing values in the input fields to see the response of the output fields.

    When the values would first appear wrong, I would recreate the equations until they were correct again.  Then when I put in a second or third set of test values, the response to the first set of values would become incorrect.

    I know the equations are correct as I have taken them from a spreadsheet that I recreating as a web form.

  • Profile Image
    Answered on August 19, 2017 at 02:50 PM

    Could you please point us to the fields causing this issue since I'm not sure which one of them is not working. I'm entering the values and fields are calculating, so I'm not sure what is wrong when you're testing.

    Also, I noticed that this field has two plus signs:

    Since that field is involved in further calculations, it might be the cause of the wrong calculations.

    Please try removing one of plus signs and see if that resolves the problem.

    Thank you!

  • Profile Image
    Answered on August 20, 2017 at 10:08 AM

    So I followed your steps and here's what I've observed.

    255000 and 1025 give you 124 value in the number of payments. The total payments and test value fields appear because your condition states hide them if the number of payments value is greater than 180.

    The same thing happens when you change 255000 with 25500. The number of payments value becomes lesser so it'd retain the 2 fields but with different values.

    Not unless you change 255000 with 25500000 for example. This gives you 12425 value in the number of payments. This definitely hides the fields back.

    So as far as I can see, the form calculation and conditions work as expected.

    Is this not what you are trying to achieve? Or if I have missed something here, please let us know.


  • Profile Image
    Answered on August 20, 2017 at 09:23 PM

    Thanks for looking into this.  Unfortunately, no the behavior show is not what is expected.

    The fields "Total Payments", "Test Value", and "Minimum Loan Duration in Years" are manually set to be hidden and appear as such in the form editor.

    The conditional is defined to hide the remainder of the fields associated with the payment option depending on computed values.  It is NOT defined to show fields based upon computed values.

    The conditional is overriding the manual hide setting of the field.  The conditional takes precedence over the field setting.  That is not the expected behavior.  If I define a field as hidden via the toggle (i.e., manually), it should always remain hidden, especially when there is nothing indicating "show" occur.

    I understand that opposite of hide is show, so the basic answer here is to not include a manually hidden field in any conditional that affects visibility.  I am just stating that it is counter-intuitive that the manual, explicit setting is superseded by the conditional.

  • Profile Image
    Answered on August 20, 2017 at 09:30 PM

    I just updated my form to not include the three fields that I wanted hidden without regard to the conditional, now I am back to my original problem.

    Only the Cash Offer section appears.  As you have explained above, the fields for Payment Offer #1 should all appear due to the conditionals.  Now that the fields which are required for the conditionals to function are hidden, all fields remain hidden.

    So, it appears that if a field is hidden, it is not being computed.  Or at least not being computed properly.  I can't debug the value of the hidden field without showing it, so I can't say what is happening.

  • Profile Image
    Answered on August 21, 2017 at 11:21 AM

    The form calculations/conditions seem to be little confusing. Please allow me some time to go through the form conditions and calculations and get back to you with relevant information. 

    Thank you for your patience. 

  • Profile Image
    Answered on August 27, 2017 at 01:21 PM

    Sorry for the delay in responding back. I have cloned your JotForm to my account and see that the fields are Total Payments, Test Value and Minimum Loan Duration in Years are set to be hidden from the field properties. As I tried to enter the values as mentioned in your earlier post, I was able to replicate the issue and see these fields are being displayed on the form with the values as shown in the screenshot provided by our colleague.

    After investigating the issue, I found that the following condition on the form is overriding the Hide field property of these fields. 

    Based on the calculations, the Balloon payment is not greater than Test Values in both cases and so they are displaying on the form. You may remove these fields from the action set of the condition so they will be hidden always. Also, please review the condition for the Payment offer #2 for the same conflict.

    Hope this information helps! Please get back to us if you need any further assistance. We will be happy to help.