• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Form Submit Event Problem


Well-known member
I have a form with the AutoValidator class. I also have a jQuery.submit binding for this form, and I make the submit event return false if certain conditions are not met (to prevent the form from completing submission). The problem is that the XenForo jQuery.submit binding for the AutoValidator system ignores my return false and completes the form submission anyway. How can I resolve this issue?

Thank you. :)


Well-known member
Check for errors in the method you use to save the form data (specified in the form's action tag) and if there's an error, respond with this:
// Do some error checking
if ($errors)
    return $this->responseError('Your error message');
And place that before where your data is saved to the database.