FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RESOLVED: Problem with JS validation
#1
Shocked 
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
Reply
#2
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
Reply
#3
(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.

I also added the example form too and its still not firing. Any help would be greatly appreciated.
TIA

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!
Reply
#4
Tongue 
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)