Yii 2.0: yii2-wizardwidget

Multi step wizard widget using tabs to guide a user through steps to complete a task.
3 followers

Yii2 Wizard Widget

Multi step wizard widget using tabs to guide a user through steps to complete a task. Based on the Form wizard (using tabs) from lukepzak (see http://bootsnipp.com/snippets/featured/form-wizard-using-tabs).

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist drsdre/yii2-wizardwidget "*"

or add

"drsdre/yii2-wizardwidget": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php
$wizard_config = [
    'id' => 'stepwizard',
    'button_previous' => Yii::t('Previous'),
    'button_next' => Yii::t('Next'),
    'button_save' => Yii::t('Save'),
    'button_skip' => Yii::t('Skip'),
    'steps' => [
        [
            'title' => 'Step 1',
            'icon' => 'glyphicon glyphicon-cloud-download',
            'content' => '<h3>Step 1</h3>This is step 1',
        ],
        [
            'title' => 'Step 2',
            'icon' => 'glyphicon glyphicon-cloud-upload',
            'content' => '<h3>Step 2</h3>This is step 2',
        ],
        [
            'title' => 'Step 3',
            'icon' => 'glyphicon glyphicon-transfer',
            'content' => '<h3>Step 3</h3>This is step 3',
        ],
    ],
    'complete_content' => "You are done!", // Optional final screen
    'start_step' => 2, // Optional to start with a specific step
];
?>
 
<?= \drsdre\wizardwidget\AutoloadExample::widget($wizard_config); ?>

Total 2 comments

#19640 report it
drsdre at 2015/10/27 10:16am
Re: Uncaught ReferenceError: $ is not defined

Thank you for the report. I've added the dependency to WizardWidgetAsset.php and released a patch version (https://github.com/drsdre/yii2-wizardwidget/releases/tag/1.1.2).

Please provide new issue in https://github.com/drsdre/yii2-wizardwidget/issues/

#19639 report it
Khurram Shahzad at 2015/10/27 07:47am
Uncaught ReferenceError: $ is not defined

I was having "Uncaught ReferenceError: $ is not defined" problem. To solve this. I have added public $depends = [ 'yii\web\YiiAsset', ]; in WizardWidgetAsset.php.

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet