How can I have fields appear on an HTML form when a checkbox is selected?
Aug.21, 2007 in
Other
Kizzeith asked:
Basically, I have an email/upload form using html and linked to a php script (post.)
I want to have a checkbox or yes/no radio buttons that ask if the submitter is uploading a file. If yes is selected, i want the upload section to be active. If no is selected, I want it to be hidden or “grayed” out.
How can I do this?
Custom Search
August 23rd, 2007 at 11:04 pm
use radiobuttons with the same name and different values it would look something like . You can then use JavaScript to determine to handel a click or change event check the value and change display to = “none” or “”
August 24th, 2007 at 8:47 am
Use the onchange event on the checkbox or radio button and then set the disabled property of the element to either true or false accordingly.