yii2-wizardwidget Multi step wizard widget using tabs to guide a user through steps to complete a task.

Yii2 Wizard Widget

  1. Installation
  2. Usage

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); ?>
1 0
5 followers
0 downloads
Yii Version: 2.0
License: MIT
Category: User Interface
Developed by: drsdre
Created on: Oct 13, 2015
Last updated: 9 years ago

Related Extensions