jquery-steps
jquery-steps copied to clipboard
Using Jquery steps with Flask
I am using Jquery steps, I want to send the data to back-end flask and return the results on last steps. Is it in the scope of jquery steps.
@asgar-hussain You need to be able to submit the form for that. You can do that within onFinished
var form = $("#example-form");
form.validate({
errorPlacement: function errorPlacement(error, element) { element.before(error); },
rules: {
confirm: {
equalTo: "#password"
}
}
});
form.children("div").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
onStepChanging: function (event, currentIndex, newIndex)
{
form.validate().settings.ignore = ":disabled,:hidden";
return form.valid();
},
onFinishing: function (event, currentIndex)
{
form.validate().settings.ignore = ":disabled";
return form.valid();
},
onFinished: function (event, currentIndex)
{
alert("Submitted!");
}
});
More examples here http://www.jquery-steps.com/Examples#advanced-form