I've abandoned my attempt to sum values in text fields and have moved on successfully to using discrete values with radio buttons. But......
Some of the fields that I need to include in the total are hidden some of the time. For instance, one of the fields has different sponsorship levels for the event the form is for - with radio button choices ranging from $1,000 to $25,000. When buying tickets or making a donation, the sponsorship choices are hidden. When the field is visible, there isn't any problem, however, when it is closed, the formula from the demos errors - because the value of that field is null or not an object. In fact if I alert the value of that object, all I get is the generic prefix for that module (dnn_ctr[module ID]_DynamicForms) because those fields are not visible (i.e. not visible until activated by another event) and aren't assigned an id (apparently) when hidden.
I've used the demo 30 for the formula and it works fine so long as those fields are visible. Do you have any suggestions on how to sum the value of several fields when some of them might be turned off at the time?
Thanks. |