Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
rfizzle opened this issue Feb 24, 2017 · 2 comments
Open
2 tasks done

Comments

@rfizzle
Copy link

rfizzle commented Feb 24, 2017

Checklist

  • I'm using version: v0.4.3
  • 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.

@jor3l
Copy link

jor3l commented Mar 28, 2017

This is a must

@ahmedanwar100
Copy link

you may use validator property, perhaps it help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants