The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (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.27 (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.27 (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.27 (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.27 (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.27 (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 "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Radio Button Group Validation Not Working - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Form Validation: JS + PHP (https://forums.formtools.org/forumdisplay.php?fid=18)
+--- Thread: Radio Button Group Validation Not Working (/showthread.php?tid=1501)



Radio Button Group Validation Not Working - robidigital - Aug 3rd, 2011

Hi,

I have the following JS validation rules setup -

Code:
var rules = [];
rules.push("required,Recruitment_Source,Please select a Recruitment Source.");
rules.push("required,Name_First,Please enter your first name.");
rules.push("required,Name_Last,Please enter your last name.");
rules.push("required,email,Please enter your email address.");
rules.push("valid_email,email,Please enter a valid email address.");

The first rule for field named "Recruitment_Source" is a set of radio buttons. If I leave them all unselected, and leave the other required fields blank and submit the form, the browser jumps to the radio buttons as though it is about to alert that the field is required, but instead it continues to the thank you page.

If I remove the radio button group from the rules, validation works fine on all of the other text input fields. Having the validation on the radio buttons basically breaks all validation.

Seems like a bug. Any ideas?

Thanks in advance,
Ryan


RE: Radio Button Group Validation Not Working - Ben - Aug 4th, 2011

Hi Ryan,

Yeah, that does sound rather like a bug - but I'd be rather surprised, because I've used it to validation radio button groups countless times. So maybe it's an incompatibility with a newer browser? It sounds like it's focusing on the field then throwing some sort of error - or not returning false (just to check, your onsubmit handler is like this, correct? onsubmit="return rsv.validate(this, rules)" ).

Would you mind trying it on a different browser to see if it still occurs? If it occurs on another browser as well than it's a bug. Otherwise, it's more likely an idiosyncracy of your form.

Do you have a link to the page?

- Ben


RE: Radio Button Group Validation Not Working - robidigital - Aug 5th, 2011

Hi Ben,

My form tag looks like this -
Code:
<form action="/form-new.php" method="POST" onsubmit="return rsv.validate(this, rules)">

Also it does occur in various browsers.

I'll PM a link to the form.

Thanks!
Ryan


RE: Radio Button Group Validation Not Working - Ben - Aug 5th, 2011

Hi Ryan,

Thanks for sending me a link to the form - it took a little puzzling though, but I found out the problem.

It's actually not so much a problem with the RSV library as the modification I tell you to make in the documentation, to make it compatible with the modifications I made to the RSV script bundled in the core.

To fix it, change this line:
Code:
rsv.errorFieldClass = null;

to this:
Code:
rsv.errorFieldClass = "";

That should make all errors mysteriously vanish...! Smile

Sorry for the headache. I'll have to update the documentation.

- Ben


RE: Radio Button Group Validation Not Working - robidigital - Aug 8th, 2011

Good find! Thanks for the fix! Smile


RE: Radio Button Group Validation Not Working - 01tbgt - Oct 1st, 2020

These rules are easy to understand and the input method is so convenient, thanks to you in advance. My further interest is the can we implement this routine at https://www.topbritishwriters.com/uk-writing-experts-review/ for further development of code and secure login of the users?


RE: Radio Button Group Validation Not Working - joefinch - Jan 28th, 2021

(Oct 1st, 2020, 2:09 AM)01tbgt Wrote: These rules are easy to understand and the input method is so convenient, thanks to you in advance. My further interest is the can we implement this routine at https://www.topbritishwriters.com/uk-writing-experts-review/ for further development of code and secure login of the users?

I have visited your site, You are providing good affordable services, I will think to buy it , if I need your services. Buy Best Sewing MachineCheap Best Sewing Machine