• Resolved nicknagle

    (@nicknagle)


    Example:
    Calculation Field(T1) is F1+F2+F3

    Details:
    F2 only shown on form when C1 is Yes
    F2 is G1*50

    So if C1 is No then F2 is not shown, T1 shows 50
    So if C1 is Yes then F2 is shown, T1 shows 0

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @nicknagle,

    I did some tests on my end based on the information provided but I couldn’t replicate this behavior so I’m not sure if I’m missing something here.

    Here’s how my setup looks:
    Field_1 – Number field
    Field_2 – Radio field with Yes and No options
    Field_3 – Calculation field that uses Field_1*50 calculation, visibility set to show when Field_2 is Yes
    Field_4 – Number field
    Field_5 – Calculation field that uses Field_1+Field_2+Field_3

    I’m using 10 for Field_1 and 100 for Field_4 and with Field_2 Yes or No the calculation is correct.
    When it’s at Yes the final score is 610 (10 + 10*50 + 100), and when I set it to No then it’s 110 (10 + 100).

    Can you tell me if I’m missing something in my setup or could you go to Forminator > Forms panel, use the Gear icon next to your form to export it and then upload it to any file sharing service like GDrive or Dropbox. Share the download link here and we can test it further on our end.

    Cheers,
    Predrag

    Thread Starter nicknagle

    (@nicknagle)

    Hello – That appears to be accurate. However I must be missing something in my form.

    https://www.dropbox.com/s/q844vapxxbu54wb/forminator-south-region-weekly-report-form-export.txt?dl=0

    Thread Starter nicknagle

    (@nicknagle)

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nicknagle

    First of all, sorry for the delay on this.

    I exported the form but not sure if I’m getting the issue.

    Could you please let us know which field needs to be selected to replicate the problem?

    Based on the front end:
    https://monosnap.com/file/VsPFe5ayhCdH8JHv7DatlsI0psu26U

    Best Regards
    Patrick Freitas

    Thread Starter nicknagle

    (@nicknagle)

    When initially viewing the form the “total pay amount has a value, this should be zero until selections are made

    You will notice it starts at $950; it should start at $0
    Then when you select for example Florida check box the value goes down to $500

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @nicknagle

    Thanks for explanation!

    I checked the form and did some “manual” calculations there and it seems that this is related to the fact that some fields used in calculations are conditionally visible. Additionally there are “calculations within calculations” – results of calculations being used as part of other calculations.

    Some of those “conditionally visible” numbers are then used with value of 1 instead of default 0 and if you calculate it this way, the initial calculation “adds-up”. I mean: it’s not correct in that sense that it uses wrong values but it is valid taking into account these wrong values that it uses.

    IF confirmed that would be a bug but since you know your form well, may I ask you for a bit more help with testing?

    Please create a copy of the form and put it on some test page on your site and then edit this copy and make all the fields that are used in calculations to be visible all time (remove all the visibility conditions from them) and then see if calculations add-up.

    Let me know please so we could consult it with our developers further.

    Kind regards,
    Adam

    Thread Starter nicknagle

    (@nicknagle)

    @wpmudev-support8
    Yes when the fields are all set to visible at all times then the calculations work correctly. So when the field is hidden the calculations need to treat as they do not exist at all. However when hidden it puts 1’s as the value it should use 0

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nicknagle

    Thank you for confirming.

    I forwarded your form to our developers to take a closer look and see if there is any change that we can do on the formula to avoid the issue.

    However, I do see there are some fixes being created from Forminator team for conditional and calculation, so please, keep the plugin updated.

    We will let you know when hearing back from the developers.
    Best Regards
    Patrick Freitas

    Thread Starter nicknagle

    (@nicknagle)

    Do you have an estimated time of when this will work? I’m trying to roll this out ASAP but may have to choose a different company if I can’t get it Resolved

    • This reply was modified 4 years, 3 months ago by nicknagle.
    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nicknagle

    This was already escalated to our second line support.

    But I’m afraid we can’t give an estimated time, as the SLS support deal with a more complex situation.

    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nicknagle

    Sorry for the delay on this.

    Could you please try this form:

    https://pastebin.com/gSQ2LXd9

    We wrapped the formula using some parentheses ().

    It starts as $0,00 now.

    Let us know if this is working for you.

    Best Regards
    Patrick Freitas

    Thread Starter nicknagle

    (@nicknagle)

    Thank you that worked

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Calculation Field not working with hidden fields’ is closed to new replies.