Front end checkbox calc value of 0 different from server-side
-
It appears that if a
calc value
of 0 is set on a checkbox option with a number also in thevalue
field, it works correctly on the back-end in merge tags but not on the front-end if thecalc value
is output in HTML or a hidden field.To reproduce, create a checkbox field and add a few options with arbitrary numbers in
value
. Then, incalc value
, use 0. If you also add an HTML field with a merge tag for a calculation that includes those fields (and yes, the calculation itself uses {field:foo:calc} and not just {field:foo}) you will notice that thevalue
field is used in the calculation instead of thecalc value
.I’m working around this issue right now by using a string (“none”) in the
value
, because luckily I’m not relying on those values for anything. However, this could cause significant issues if thevalue
andcalc value
both need to be numbers andcalc
is 0.
- The topic ‘Front end checkbox calc value of 0 different from server-side’ is closed to new replies.