Add Custom Buttons

Code sample

//View code
use buttflatteryormwizard\FormWizard;
$js = <<< JS
    var mybutton = $( '<button id="new"></button>' ).text( 'New Button' )
    .addClass( 'btn btn-warning' ).on("click",function(e){
        e.preventDefault();
        alert("hello");
    });
\JS;
$this->registerJs($js, yii\web\View::POS_READY);

echo FormWizard::widget([
    'toolbarExtraButtons' => new \yii\web\JsExpression('[mybutton]'),
    'steps' => [
        [
            'model' => $shootsModel,
            'title' => 'My Shoots',
            'description' => 'Add your shoots',
            'formInfoText' => 'Fill all fields'
        ],
        [
            'model' => $shootTagModel,
            'title' => 'Shoot Tags',
            'description' => 'Add your shoots',
            'formInfoText' => 'Fill all fields'
        ],
    ]
]);
Fill all fields

Fill all fields