Can't seem to get Prototype AJAX form validation to work in conjunction with Codeigniter

Posted by MattB on Stack Overflow See other posts from Stack Overflow or by MattB
Published on 2010-06-16T12:25:48Z Indexed on 2010/06/17 3:33 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

Is there some kind of trick involved? Here's how I would envision it working:

1) User tries submitting the form

2) Event.observe captures this and sends an AJAX request to a special validation URL (PHP using Codeigniter)

3) If no errors were returned, continue submitting the original form

4) If errors were found, cancel form submission and display

Mostly, I can't seem to get a separate AJAX validation request to work as the form continues submitting. I could use Event.stop(event), but have not found a way to re-start the process if no validation errors exist from the validation call. I'd post code, but I have about 15 examples of things I've tried and it would just clutter this question.

Any ideas? :-( I didn't think form validation would be this difficult.

Many thanks, - Matt

© Stack Overflow or respective owner

Related posts about php

Related posts about AJAX