Once focus is out of the coupon field, conditions grab value from wrong field

  • SunbridgeInstitute
    Asked on January 20, 2016 at 3:46 PM
    Just now, when I type COMMUNITY into the Coupon Code, and tab out of that field, The Alumni/Community Discount calculates correctly, but the Tuition Total does not work. It just grabs the Tuition Subtotal.

    When I got your message earlier, and tested it, it worked. But now it doesn't. I really need this to work reliably. 

  • Ben
    Replied on January 20, 2016 at 4:16 PM

    Screenshot was not transferred over so here it is:

    Once focus is out of the coupon field, conditions grab value from wrong field Image 1 Screenshot 30

    I have tried other options while answering the other thread and this seemed to work. Selecting the options as you have selected (based on the screenshot) I see that there is something strange.

    Let me explain why:

    1. On your screenshot you add COMMUNITY discount and the fields above are showing 0 in them, while Alumni/Community Discount is showing half of the original value.

    Total Tuition does not show anything other than the raw tuition subtotal value.

    During my tests, the fields above it are actually hidden - well first Combination Discount: 2-day workshop holds 25 as its value, but once community is applied, it gets hidden.

    No mater if I click or tab my way out of the field, this seems to stay as it is and works without any issue.

    Once focus is out of the coupon field, conditions grab value from wrong field Image 2 Screenshot 41

  • SunbridgeInstitute
    Replied on January 21, 2016 at 1:29 PM

    Yes, after I submitted this ticket, I made some changes that hid irrelevant data on the form for the ease of the user. Do you think that adding these "hide fields" conditions actually enhanced the reliability of the form's calculations?

    I'm so nervous about calculations happening reliably--I've had so many instances of it miscalculating.

    Thank you again for your help.

  • Ben
    Replied on January 21, 2016 at 3:14 PM

    They could..but let me explain this. The hidden fields are working differently for conditions and form calculation widgets as you can (in form calculation) set the widget to ignore values from hidden fields.

    There is also an option in form preferences that set the hidden fields no value once hidden, which can impact how calculations work.

    So technically it could, but all depends on the calculations setup you have on your forms.

    As long as it is working properly that is good to hear :)

    If it happens to cause any issues, just let us know and we would be happy to check it out and see what can be done.

  • SunbridgeInstitute
    Replied on January 21, 2016 at 3:41 PM

    Yes, I do have preferences set up so that hidden fields are zeroed out. Remembering that is what made me realize that it might be helping. I hope that solved my problems. Thank you for your help!

  • Ben
    Replied on January 21, 2016 at 4:44 PM

    You are welcome :)

    As mentioned do let us know if there is anything else that we might be of assistance with and we would be happy to be so :)