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

Prevent .show if current step is not valid #49

Open
troykelly opened this issue Feb 17, 2016 · 0 comments
Open

Prevent .show if current step is not valid #49

troykelly opened this issue Feb 17, 2016 · 0 comments

Comments

@troykelly
Copy link

I'm not sure how to prevent a user going to a random step (for example steps are in the header) using the 'show' method when the current step is not valid.

eg:

            $('.checkout-steps a').on('click', function(){
                var gotostep    = $(this).data('gotostep');


               //if(the.current.step.is.valid()) {
                checkoutWizard
                    .formwizard('show', gotostep);
            });

Validation fails for fields on the page - but the user can go to the next (or any) step. The user can then submit the form (bypassing validation)

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

1 participant