Calculation does not calculated if radio button is change, then returned back to previous selection

  • wolfpaw69
    Asked on April 4, 2017 at 8:11 PM

    No sure how to title this but that was the best I could come up with.  Anyway, now for the explanation.

    On my form I have a radio button that calcultate the termite inspection if the client chooses yes or no.  The calculation uses the location to determine if there is a travel cost.

    Example: The base cost is $100 (Payson). If the client chooses Strawberry-Pine, the cost would be $125.  However, if the client chooses Strawberry-Pine, then chooses Payson, then goes back to Strawberry-Pine, the calculation only uses the base price, which shorts the price by $25 in the case.  I hope that explains it good enough.

    Calculation does not calculated if radio button is change, then returned back to previous selection Image 1 Screenshot 20

    The first screen shot shows the price at $125.  The second screen shot is the same as the first except the location is changed from Pine-Strawberry to Payson which changes to $100, then changed back to Pine-Strawberry but it does not calculated after that, it keeps the base cost of $100 when it should say $125.

  • BJoanna
    Replied on April 5, 2017 at 3:22 AM

    I have inspected your form and I was able to replicate mentioned issue. This is happening because when NO is selected inside of Termite Inspection field it is passing 0 to Termite Travel Cost hidden field and it is overriding value 25 that is passed to same field from dropdown field "Location (Town or City)". 

    On my cloned form I made some hidden fields visible so that you can see the issue.

    Calculation does not calculated if radio button is change, then returned back to previous selection Image 1 Screenshot 20

    To resolve this issue you will have to modify your conditions that you have set to perform calculation. Maybe you can perform calculation for Total Termite Inspection Cost field with Travel Cost field instead of Termite Travel Cost. 

    I also think that it would be easier to perform calculation with Form Calculation widget instead with conditions.

    Inside of this guide you can find how to do it:

    How to Perform Form Calculation Using a Widget

    You would also need to assign calculation values to your dropdown and radio button fields.

    How to Assign Calculation Value

     

    Hope this will help. Let us know if you need further assistance.