This form has a calculated field with the Total of the Subtotal, Tax, and Shipping cost.
But we want it make it so that if the user clears a field, it does not keep the original value in the total calculation. How can we do this without using JS?
This form has a calculated field with the Total of the Subtotal, Tax, and Shipping cost.
But we want it make it so that if the user clears a field, it does not keep the original value in the total calculation. How can we do this without using JS?
I can reproduce and the workaround does not work either ref #517426
Change it to:
=IF(EQ(Tax,""),"",SUM(Subtotal,Tax,Shipping_Cost))
If Tax is empty, then the total is blank. Could repeat for the other fields if needed.
Edit: I think I misunderstood your requirements. It sounds like you want it to recalculate when the field is blank, not require that it has a value. Maybe changing the default value to 0 would resolve this issue?
I tried both solutions, your IF workaround first and that did not change anything. Then I tried the default value for Tax but no luck there either. A default value is a value entered into a field if and only if the variable is blank on load.
Hmm I'm on self-hosted and it just works without doing anything special. Using your original formula, as soon as I click off the tax field, the total updates. Must be a cloud bug.
After deleting the value, if you click off of the field, does the Total field update correctly?
No, this is when I want it to update the total, when the user unfocused the field leaving a blank value. In the video you can see I am clicking off the field and it is not updating, the value will not be correct until after submission in the variable left over.
I couldn't tell if you were clicking off the field or not, thanks for clarifying. Seems like a bug to me.