thecodemine / formwizard

jQuery plugin based on top of jQuery UI which turns a form into a multistep wizard. Integrates with the jQuery form plugin for AJAX submission of the form, the validation plugin for client side validation and the BBQ plugin for enabling the browsers back and forward buttons.
140 stars 54 forks source link

incorrect solution for back and next buttons #10

Closed ghost closed 13 years ago

ghost commented 13 years ago

I think the solution for the back and next (and also submit) buttons is incorrect. Javascript is making the wizard, so javascript should create those buttons, tu put them in HTML and to modify them in JS is an error. I think a better solution is to create those buttons from Javascript with a default HTML markup and to permit the user pass a custom HTML markup for the buttons too.

Finally, Nex button should not be converted to Submit button, Next button should dissapear in the last step (or be disabled). Submit button should be declared in HTML, and with any preferred element (input type submit, input type image, button, etc). Changing that our HTML is cleaner and can work even without JS.

thecodemine commented 13 years ago

Thank you for your feedback.

I'll consider your proposal and see if it would be a reasonable way to go. For what it's worth, the forms should work without javascript, even in the current iteration of the plugin. This due to the fact that the submit button is used as the next button in the wizard. It's just the caption of the button that changes.