Is there possible to trigger the validation process with a link or button?

I'm using fieldgroup with multipage fieldsets, then I want to validate the form when the user click in "next page"

Any ideas how to acomplish this? I tried something like what is suggested here: http://jqueryvalidation.org/valid/ but not working.

Thanks!

Comments

Jelle_S’s picture

The valid function you referenced should work.
Something like this (untested code):

$('.next-page').click(function () {
  var $form = $(this).closest('form);
  // Check if this form has a validator attached to it.
  if (typeof $form.valid === 'function') {
    $form.valid();
  }
});
dariogcode’s picture

Thanks @Jelle_S for answer. And yes, you're right. The problem is that fieldgroup only show the message in last page. I'm working on that, thanks!

Jelle_S’s picture

So this is fixed?

dariogcode’s picture

yeah, it is fixed. Thanks!