VinceG / twitter-bootstrap-wizard

This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
MIT License
1.39k stars 676 forks source link

Dynamic Steps #35

Closed AbuAlKarmi closed 10 years ago

AbuAlKarmi commented 11 years ago

Could you please add a functionality to add new Dynamic Steps ( tab and content ).

VinceG commented 11 years ago

Adding steps is adding new tabs, since tabs are part of the html structure i am not sure how and if this should be part of the bootstrap wizard.

VinceG commented 11 years ago

@AbuAlKarmi Please reply so we can either discuss or close this.

AbuAlKarmi commented 11 years ago

Sorry for late. Yes I can add a new tab using bootstrap tabs, but I can't navigate them using wizard methods, since the new tab doesn't has an index so it's not visible as a step in the wizard methods. I tried to re-initialize it after adding the tab, but it doesn't work. May we need a method to destroy the wizard and initialize it again after adding a new dynamic step ?

Regards,

VinceG commented 11 years ago

@AbuAlKarmi Hm i see what you mean. i'll have to test this myself and see how it works right now and what are the options to reinitialize the wizard when adding/removing tabs.

anorborg commented 11 years ago

@AbuAlKarmi Do you have code or something you code put on plunker or jsfiddle?

VinceG commented 11 years ago

@AbuAlKarmi @anorborg

It is confirmed. For some reason it won't move past the last step when more than one is added. See:

http://embed.plnkr.co/WqgUtU/preview

VinceG commented 11 years ago

@anorborg It's all the way at the bottom.

anorborg commented 11 years ago

created a pull request #50 to hopefully take care of this.

VinceG commented 10 years ago

Added.

a3aakash commented 7 years ago

can anybody tell me how to apply dynamic steps?

anorborg commented 7 years ago

@a3aakash I haven't used this in a while, but here is a comment I posted about using dynamic steps with angular a while ago (http://disq.us/p/jcr6jj). The reset I refer too is now in the code and should be doable. I don't have time to put together an example, but basically add the steps to the DOM in javascript and call the resetWizard method. Hope this helps.

a3aakash commented 7 years ago

@anorborg I have use the same steps you have mentioned but using resetWizard function it all away clears up the form inside the tab content. So I am pretty much confused that is dynamic steps are possible in middle or not. I have also created an issue regarding this #203 . Please @VinceG look into this matter as it is very urgent. Thank you.

a3aakash commented 7 years ago

@anorborg i found the solution of getting dynamic steps in middle as in reset wizard you are calling fixNavigationButtons which is only used when you want to empty the fields of whole form. If you are adding steps within the form wizard the you dont want that function to be called. Thank you. have a nice day.. :)