Radio button doesn't calculate properly

  • wolfpaw69
    Asked on October 11, 2016 at 8:36 PM

    On my form a I have a field (Total Termite Inspection Cost) that calculated based upon location.  The base cost is $100 plus travel cost.  If the customer chooses "Yes" it calculates both fields.  If the customer clicks "Yes", then "No", and "Yes" again, they only get charged the base cost.  The field does not calculate upon selection.  How do I fix that?

    In the screen shot below you can see this happening.  The first slide is correct, the second slide the field is hidden because the client selects "No", the third slide the client selects "Yes" again which does not calculate travel cost.

    Radio button doesnt calculate properly Image 1 Screenshot 20

  • Ashwin JotForm Support
    Replied on October 11, 2016 at 11:20 PM

    Hello wolfpaw69,

    I did test your form and I am able to replicate the issue you are having. Let me rework on your form's condition and get back to you soon.

    Thank you!

  • wolfpaw69
    Replied on October 14, 2016 at 11:52 PM

    Haven't heard back.

  • Elton Support Team Lead
    Replied on October 15, 2016 at 3:54 AM

    @wolfpaw69

    It is because this condition is triggered when you select to NO.

    Radio button doesnt calculate properly Image 1 Screenshot 30

    This resets the Termite Travel Cost value to zero (0) when you select NO.

    So here's how your condition works base on your current setup.

    $125 when YES (100+25)

    $100 when NO (100+0)

    $100 when YES (again)

    Unfortunately, the condition does not analyze what value was taken away and add it back again if needed, unless you have defined that in your condition.

    So to fix it, you will have to create another condition that adds the $25 back when you select YES

    Example:

    Radio button doesnt calculate properly Image 2 Screenshot 41

    Hope this helps!