How do I reset Session Variables (radio buttons) when Reset button is selected?
I have a flash form with radio boxes. The user must select a radio button before submitting the form (required="yes"). If they don't fill out, complete, or check a required field they receive the flash messagebox telling them that it cannot be submitted because field(s) xxx are not completed. All works well!!!
However, when the user clicks a reset button (<cfinput type="reset" ...>) then fills out all of the required fields with the exception of the radio button they are able to submit the form because the reset does not clear out the original selection for the radio button.
If I use a <CFDUMP var="#form#> I see that in the first instance the variable is not even initialized and that is whay it is being caught by the <cfinput type="radio"...required="yes"...>. When I submit the form after a radio button has been clicked then the reset button is pressed I see that the variable is initialized using CFDUMP and that it is an empty string.
Is there a way to use the onclick function of the reset button to kill it (such as structclear(inputname)) so that the user cannot submit without selecting the radio button again?
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.