jquery-steps icon indicating copy to clipboard operation
jquery-steps copied to clipboard

Using Jquery steps with Flask

Open asgar-hussain opened this issue 4 years ago • 1 comments

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 avatar Apr 14 '20 04:04 asgar-hussain

@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

rahulkp220 avatar Apr 18 '20 21:04 rahulkp220