troubleshooting Question

Need form textfield validation only required when radio button selection is "yes"

Avatar of DeniseBarker
DeniseBarker asked on
Web Languages and StandardsJavaScriptColdFusion Language
12 Comments1 Solution409 ViewsLast Modified:
I have a radio button on a form and in the hidden table row below it, a hidden textfield.  When the "yes" option is selected on the radio button, javascript code makes the table row visible so the user can now see the textfield to fill it in.   Problem:  I want to make this textfield required using ColdFusion MX 7 onsubmit, onserver settings;  when submitting the form, if the radio button option is "no", and this textfield is hidden, I get an error stating to fill in the textfield (but I can't because it's hidden).   I really only need the textfield to be required when it is visible (user has chosen "yes" on the radio button).   I'm new to CF and even newer to Javascript --- how can I make this textfield required only when the radio button is selected "yes"??  Thanks so very much!!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros