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); ?>
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.
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/
I am getting Javascript error "Uncaught ReferenceError: $ is not defined" in google console...How do i rectify this?
BBBootstrap.com
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.