The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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.

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.

(May 27th, 2010, 8:46 PM)Ben Wrote: 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

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