buttflattery / yii2-formwizard

A Yii2 plugin used for creating stepped form or form wizard using yii\widgets\ActiveForm and \yii\db\ActiveRecord
https://yii2plugins.omaraslam.com/formwizard
Other
96 stars 13 forks source link

Jump to any step #50

Closed girishcp closed 4 years ago

girishcp commented 4 years ago

Hello,

Is this possible to jump to any step from the FORM wizard, actually i want to activate all the steps when i am going to update my records? It is ok for the creation of the new record but it should be active all the steps when i update my records.

Can you please help me on this.

Thank you, Girish

buttflattery commented 4 years ago

@girishcp When i started this extension after reviewing the smartWizard plugin i decided to keep the options turned off by default that fall under the anchorSettings option of the js plugin

Reason that they allowed you to by pass the step validation from being triggering, when i say that any one who has worked with this plugin will say that there are events leaveStep and showStep but i am binding ActiveForm events to validate the form and decide to navigate or not so that means i cant bind and event inside an event as it would keep duplicating the binding and even if i remove the extra binding every time or try to avoid binding it would still be an overhead to the script or file size, so i decided to disable these options and because of these options i dropped the default next previous and backButtonSupport and used custom buttons which call the yiiActiveForm validate() method which then take the control and transfer to the activeForm events and then move on.

But some how i agree that the scenario you have mentioned this looks a valid option to be still supported so i would be adding this functionality as a new feature through which we can enable the edit mode and all the anchor links will be enabled and clickable, so we can navigate around freely and change the info.

I would update you here once i complete it and add a sample code and wiki docs link

buttflattery commented 4 years ago

You can use the editMode option to turn the edit mode and you can jump to any step by clicking on the anchor link. See details Here . run composer update to update to the latest version. @girishcp

girishcp commented 4 years ago

Thanks a lot, it's working perfectly.

buttflattery commented 4 years ago

You are welcome @girishcp i am closing this issue now, have a good day.