You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be a duplicate of #234 but I don't understand the solution there.
When I call onStepChanging then an external api call is made (whenValidate returns a jquery promise). For synchronize calls this method works because I can just return true/false, but what do I have to do when I have a asynchronous call?
$(".steps-validation").steps({
headerTag: "h6",
bodyTag: "fieldset",
transitionEffect: "fade",
titleTemplate: '<span class="number">#index#</span> #title#',
autoFocus: true,
enableFinishButton: false,
onStepChanging: function (event, currentIndex, newIndex) {
// Allways allow previous action even if the current form is not valid!
if (currentIndex > newIndex) {
return true;
}
var validateForm = form.parsley().whenValidate({
group: 'block-' + currentIndex
});
validateForm.then(function () {
// CONTINUE HERE WITH NEXT STEP
$("#wizard").steps("next",{});
}, function () { console.log('oh no..');});
The text was updated successfully, but these errors were encountered:
This seems to be a duplicate of #234 but I don't understand the solution there.
When I call onStepChanging then an external api call is made (whenValidate returns a jquery promise). For synchronize calls this method works because I can just return true/false, but what do I have to do when I have a asynchronous call?
The text was updated successfully, but these errors were encountered: