0

I would like to start a Steps form using jQuery-steps BUT without the finish button at the beginning.

Because I need to handle some other button and jQuery event to activate (show) or deactivate this button; but I didn't find how I can change those setting after initialization.

I tried this:

function finish() {
  $("#wizard-2").steps({enableFinishButton: true });
}

but without success - Is there a way to change those setting (enableFinishButton for this example) after the steps form is ready and working?

Unihedron
  • 10,902
  • 13
  • 62
  • 72
zehunter
  • 1
  • 2

1 Answers1

0

I don't know the correct way but a hack I'm using is:

$('a[href="#finish"]').addClass('disabled');

No where can I find an API method to change an existing setting, though there must be a way.

Update:

I have switched to hiding the finish button entirely via the following code:

$('a[href="#finish"]').css('display', 'none');

My last wizard step calls a web api method so I make sure to show the finish button in the beforeSend function of the Ajax call, then set it to display: none if the data warrants it.

  • 1
    There is no correct way. The API for this plugin is incomplete. The JqueryUI way of doing things doesn't work. You also can't reinitialize the plugin and pass in the option you want to change, that also doesn't work. – KyleM Mar 26 '15 at 23:23