How can i make a callback to accordion after form validation, to show errors

Posted by Esger on Stack Overflow See other posts from Stack Overflow or by Esger
Published on 2010-04-21T21:41:22Z Indexed on 2010/04/21 21:43 UTC
Read the original article Hit count: 175

I have a very long form, which is divided into fieldsets which in turn are being shown or hidden, using the harmonica from jQuery UI. I am using form validation from jQuery as well, all newest versions. After submission and validation the user is redirected to the first erroneous field by $('myForm').validate(); But the containing harmonica fieldset has to be showed/opened with $('myForm').accordion('activate', index); as well, in order to show the field to the user.

So how can I open the appropriate accordion fieldset after the form has been tried to submit? Is there a way to do it in a callback function after $('myForm').validate();

© Stack Overflow or respective owner

Related posts about jquery-plugins

Related posts about accordion