jquery-wizard icon indicating copy to clipboard operation
jquery-wizard copied to clipboard

"onNext" with return false does not Prevent Wizard from Continuing

Open rfizzle opened this issue 8 years ago • 2 comments

Checklist

  • [x] I'm using version: v0.4.3
  • [x] My browser is: Chrome 56

Description

Returning false via the "onNext" does not prevent the wizard from continuing to the next item.

How can we reproduce this bug?


    var wizard = $("#exampleWizardForm").wizard({
      step: '.steps .step, .pearls .pearl',
      templates: {
        buttons: function buttons() {
          var options = this.options;
          return '<div class="panel-footer"><div class="wizard-buttons"><a class="btn btn-default btn-outline" href="#' + this.id + '" data-wizard="back" role="button">' + options.buttonLabels.back + '</a><a class="btn btn-primary btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="next" role="button">' + options.buttonLabels.next + '</a><a class="btn btn-success btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="finish" role="button">' + options.buttonLabels.finish + '</a></div></div>';
        }
      },
      classes: {
        button: {
          hide: 'hidden-xs-up',
          disabled: 'disabled'
        }
      },
      onNext: function(e) {
        return false;
      }
    });

What did you expect to happen?

The wizard should not have switched to the next section.

What happened instead?

The wizard went to the next section.

rfizzle avatar Feb 24 '17 23:02 rfizzle

This is a must

jor3l avatar Mar 28 '17 19:03 jor3l

you may use validator property, perhaps it help

ahmedanwar100 avatar Sep 09 '20 12:09 ahmedanwar100