I am building a form that has a lot of yes/no radio buttons throughout it. These radio buttons often show or hide certain fields that ask for currency input from the user. If a user enters numbers into a field and then that field is hidden by one of those radio button selections the form still uses the data they entered into the hidden field in calculations that are computed in other fields at the end of the application. Is there a way using JavaScript or CSS to clear out that data that was entered into the hidden fields? It would need to work on a per field basis and not overall because there are some fields that are always hidden that hold data that I need.
Currently the only way I've been able to do this is to write an IF statement as part of the formulas in the calculation fields. However, that gets really confusing when there are multiple radio buttons involved which hide and show different fields.