Bootstrap wizard and jquery validate, force next tab

I am usign bootstrap wizard for a form and jquery validate for client side validation, i want to force the next tab, at the moment if a person fills the first tab they can click on any of the remaining tabs and continue and i dont want that, what i am looking for is for people to fill tab 1 and if validation success the move to tab 2 and so on. any ideas on how to force this?

this is my jquery

$(document).ready(function() { if ( $( "#rtabform" ).length ) { var $validator = $("#tabform").validate({       rules: {         email: {           required: true,           email: true         },          field1: {                      required:true                  },                  password:{                      required:true,                      minlength: 8                                           },                  password_confirm:{                      required:true,                      equalTo: "#password"                  },       },               messages:{                   password_confirm:{                      equalTo: "Password dont match."                  }               }     });      $('#rootwizard').bootstrapWizard({         'tabClass': '',         'onNext': function(tab, navigation, index) {             var $valid = $("#registro-representante").valid();             if(!$valid) {                 $validator.focusInvalid();                 return false;             }         },                     onTabClick: function(tab, navigation, index) {                     var $valid = $("#registro-representante").valid();             if(!$valid) {                 $validator.focusInvalid();                 return false;             }                 }     });          } 

});

Thanks guys!

Replay

Category: jquery Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.196 (s). 12 q(s)