VinceG / twitter-bootstrap-wizard

This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
MIT License
1.39k stars 676 forks source link

Custom check before onNext event is fired #149

Closed churiart closed 8 years ago

churiart commented 8 years ago

I, in the first step try to validate a user input by sending an AJAX request to server and retrieve the result and want to prevent user to go through next step if result contains an error.

I made my $.ajax() call right within onNext event function but wizard goes to next step very quickly after clicking next button without even waiting for $.ajax() to finish. So I'm not able to stop processing to next step on ajax error.

Is there any workarounds for this? If yes then can I have this not within onNext event and just in another place/file?

Thank you

churiart commented 8 years ago

According to https://github.com/VinceG/twitter-bootstrap-wizard/issues/41 solved. Thanks