i using jquery wizard , jquery validation application , need stop validation kicking in when users hits "prev" button or in way moves backward in form.
current code follow.
wizard
$("#wizard-form").wizard({ stepswrapper: "#mc-wizard", submit: ".submit", beforeselect: function(event, state) { var inputs = $(this).wizard('state').step.find(':input'); return !inputs.length || !!inputs.valid(); }, afterselect: function(event, state) { } beforeforward: function() { } });
validation
$("#mc-wizard").validate({ rules: { rolloverperiod: { required: true, max: 24 }, monthlyspend: { required: true, number: true, max: function() { return parseint($('#annumincome').val()); } }, amntspndtravel: { required: true, number: true, max: function() { return parseint($('#annumincome').val()); } }, errorplacement: function(error, element) { element.val(error.text()); } });
i tracking current step with,
$(this).wizard('state').step.get(0).accesskey
but need know way user navigating - need know "nextstep". don't know if possible.
your support appreciated.
thank
Comments
Post a Comment