The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Server side radio button validation - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Server side radio button validation (/showthread.php?tid=719) |
Server side radio button validation - sully - May 26th, 2010 Could someone please help me to figure out what the code would be to server side validate radio button input. Ive followed the tutorial and have it working with all the elements in my form but cant seem to find any information on how to valiate radio buttons. Any help would be much appreciated. RE: Server side radio button validation - Ben - May 27th, 2010 Hi Sully, Actually, radio buttons should work just the same as other fields. e.g. if your radio buttons have name attributes of "my_radios", you could just enter: Code: rules.push("required,my_radios,Please select at least one radio button"); If still no luck, post the relevant HTML and describe what validation rules you're trying to run on them. - Ben RE: Server side radio button validation - sully - May 28th, 2010 (May 26th, 2010, 6:53 PM)sully Wrote: Could someone please help me to figure out what the code would be to server side validate radio button input. (May 27th, 2010, 8:46 PM)Ben Wrote: Hi Sully, thanks for the reply but i got this figured out. after following the validation tutorial i was under the impression that all the code in the sample form was for the validation, not just the rules. so, i included the code to refill the form in my document thinking that it was part of the validation. RE: Server side radio button validation - Ben - May 28th, 2010 Ah gotcha. Glad you sorted it out! - Ben |