John Brunner
John Brunner

Reputation: 2872

FuelUX Wizard is not submitting my form when click on 'finished'

I'm using bootstrap and FuelUX (just the Wizard). I use the wizard with a Form, and want to submit the Form (via jquery) when the user is at the last step and clicks "Finish". But everything in my "Finish"-Handler works, but not the .submit part. What am I doing wrong?

My code looks like:

<form id="wizard_form" ...>
<input ... />
</form>

$('#fuelux_wizard').on('finished', function(e, data) {
    $("#wizard_form").submit();
    console.log("OK");
});

When I do the same with a normal button displayed anywhere... it works.

Upvotes: 1

Views: 3962

Answers (1)

cognant
cognant

Reputation: 441

I landed on this when my form, with a button of type submit, in a Fuel UX wizard wouldn't actually trigger a submit

Checkout my jsFiddle which seems to work

var wizard = $(".wizard").wizard();
wizard.on('finished', function (e, data) {
    $("#form-in-wizard").submit();
    console.log("submitted!");
});

Upvotes: 4

Related Questions