The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Form 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: Form Validation not working (/showthread.php?tid=125) |
RE: Form Validation not working - Ben - Oct 4th, 2009 Hey guys, Terry - are you running IE? If so, try emptying your cache and revisiting the page. If you're using Firefox or another browser, try either emptying your cache or visiting the rsv.js file in your browser & clicking "refresh" to ensure you have the latest version. If you do still have trouble, mind posting a link to your webpage? Thanks! - Ben RE: Form Validation not working - alrioart - Oct 4th, 2009 You are probably asking that of *Jim* - not me, Terry, right? Personally, I don't use IE. Terry RE: Form Validation not working - Ben - Oct 4th, 2009 Blah! Sorry - yes, I meant Jim. Too little sleep. RE: Form Validation not working - jlkane - Oct 4th, 2009 (Oct 4th, 2009, 2:54 PM)Ben Wrote: Blah! Sorry - yes, I meant Jim. Too little sleep. Jim here. I develop on a Mac, so its FF3 and Safari for me. > Terry - are you running IE? If so, try emptying your cache > and revisiting the page. If you're using Firefox or another > browser, try either emptying your cache or visiting the > rsv.js file in your browser & clicking "refresh" to ensure > you have the latest version. I've tried all that. Still no go. > If you do still have trouble, mind posting a link to your > webpage? Happy to. Here are two: This one calls in last night's rsv.js from /global/scripts and validation does not work: http://entrepreneurshipforum.org/register_step_2rsv.shtml This one calls in the stock version of rsv.js from the site's root directory, and validation works perfectly: http://entrepreneurshipforum.org/register_step_2.shtml Jim RE: Form Validation not working - Ben - Oct 4th, 2009 Ah, on this page: http://entrepreneurshipforum.org/register_step_2rsv.shtml I see you've commented out the following: Code: // rsv.errorFieldClass = null; Try uncommenting it & removing the custom error handler line, so: Code: rsv.errorFieldClass = null; Those two values still need to be overridden every time you use the bundled RSV script. I'm *pretty* sure that should fix it... but let me know if not! - Ben RE: Form Validation not working - jlkane - Oct 4th, 2009 Gaa! I'm SO sorry to have cost you extra time on this! Of course I commented those lines out when I hooked this form up to the stock version of RSV ...and then forgot to put them back into play with last night's tweaked version! Sheepishly... Jim One last question on this topic, then: The header of the new version of rsv.js says "v2.5.1, Nov 14 2008". Shouldn't it acknowledge last night's work? Jim RE: Form Validation not working - Ben - Oct 4th, 2009 Excellent! Quote:The header of the new version of rsv.js says "v2.5.1, Nov 14 2008". Shouldn't it acknowledge last night's work? Actually no - there was one minor change with 2.5.1 which I incorporated into this build. The header modification is custom to the Form Tools version only - it wouldn't affect the original script. But I'm glad we finally got it resolved. - Ben RE: Form Validation not working - jlkane - Oct 4th, 2009 I don't mean to be argumentative, but if the header looks like the stock version, this should BE the stock version. But it's not; it has some FT-only tweaks inside. That just seems wrong to me. What am I missing? Jim RE: Form Validation not working - Ben - Oct 5th, 2009 No - not argumentative at all! I just didn't explain it terribly well. Here's my reasoning: the validation script contains X number of features and it's currently at version 2.5.1; it's a separate script that's independent of Form Tools, so I want it's numbering scheme to also be independent. The only difference between the Form Tools bundled 2.5.1 version and the main 2.5.1 download file is that the initial configuration settings (which are all configurable) have been hardcoded to different default values at the top of the file. So it's the same script, same version: I just cut down on redundancy by specifying the same settings in one place, rather than multiple places. I couldn't create a version 2.5.2, since the main RSV download file would always be 2.5.1 (the Form Tools-specific changes can't be included as default settings since they make no sense independent of Form Tools). Plus it wouldn't make sense to have a new release for a problem with the Form Tools-only version. Technically it wasn't even a problem: if you'd defined the g_rsvErrors function BEFORE including the script, it would have worked. But that's silly, so I figured it consistuted & bug and fixed it. But ideally, the rsv.js script should remain untouched & I should have the custom settings defined elsewhere. I agree on that score. It was just more convenient this way. That's pretty much it! - Ben RE: Form Validation not working - jlkane - Oct 6th, 2009 (Oct 5th, 2009, 9:14 PM)Ben Wrote: But ideally, the rsv.js script should remain untouched & I should have the custom settings defined elsewhere. I agree on that score. It was just more convenient this way. Yes, I think separating the settings from the script would be the appropriate solution, but I can see why it wouldn't feel worth the fuss. Thanks for bearing with me, Ben. Jim |