The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
RESOLVED: Problem with JS validation - 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: RESOLVED: Problem with JS validation (/showthread.php?tid=477) |
RESOLVED: Problem with JS validation - martin_undefined - Jan 31st, 2010 Okay - so I have a form that is working perfectly with PHP validation. I've now added JS validation and I just can't seem to get it to fire. The PHP validation though continues to work. As a test, I added the demo form from the JS validation tutorial to my site and it works perfectly i.e. the paths etc. seem fine. I can't think what I'm missing, which means it must be pretty obvious! Any suggestions where I should look? As far as I can see the script is being loaded, but it just isn't picking up the rules / activating validation. Are there any pitfalls around the placing of the onsubmit statement? Help appreciated. Martin P.S. Running FT 20100101 RE: Problem with JS validation - ksims - Jan 31st, 2010 I am having the exact same problem, this is the second time I've used form tools, and the js validation worked in my previous install but it doesn't seem to be working with my recent installation. I also added the example form too and its still not firing. Any help would be greatly appreciated. TIA RE: Problem with JS validation - martin_undefined - Feb 1st, 2010 (Jan 31st, 2010, 5:59 PM)ksims Wrote: I am having the exact same problem, this is the second time I've used form tools, and the js validation worked in my previous install but it doesn't seem to be working with my recent installation. So, just to be clear, are you saying you've added the demo form to your site and that isn't working either? For me, the demo form works as expected, so that means my script path etc. i okay. It just seems like the JS on my actual form is being ignored and it runs straight to the php validation. As far as I can see using Firebug, the script is loaded, so I suspect it's a silly syntax error somewhere on mine. Still not resolved it though, despite staring at the script! RE: Problem with JS validation - martin_undefined - Feb 2nd, 2010 Oh dear - it was a silly syntax error. I'd left the $ symbol in front of the validation rules ($rules.push) when I'd copied and pasted them from the php validation. So for anyone suffering a similar problem - check that first! |