Forums

validate new added field

newtester 30 May, 2012
Hi,

Please help me.
I have a field named 'Hear From' which is Radio box type.
the options are :
- Corporate/Associations
- Facebook
- Flyers/Brochures
- Friend Referral
- Magazines
- Newspaper
- Online Ads
- Others

The case is when user choose 'Others' option, a new text box created/appears beside it as a place where user must fills the specific option & this field has to be 'required'.
I've successfully added that new field when user choose 'Others' option, but the problem is this field not validated, so user can leave it blank and its wrong.

you can see the form at http://test.sgmade.com/stilettos-cms/index.php/group-tour-enquiry-form

somebody help me with this issue.
regards,
rie
newtester 30 May, 2012
Hi Bob, how about radio button, each option have different ids, not like dropdown which only have single id ??
GreyHead 30 May, 2012
Hi newtester,

I'd guess that the code gets a bit more complicated but it should still work OK. I'll make a note to try it out.

Bob
GreyHead 01 Jun, 2012
HI newtester,

I added the script for a radio button group version here in the same thread as the drop-down version.

Bob
This topic is locked and no more replies can be posted.