\Kendo\UI\Wizard

A PHP wrapper for Kendo UI Wizard.

Inherits from \Kendo\UI\Widget.

Usage

To use Wizard in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo Wizard

<?php
// Create a new instance of Wizard and specify its id
$wizard = new \Kendo\UI\Wizard('Wizard');

// Configure it
$wizard->actionBar(true)

// Output it

echo $wizard->render();
?>

Methods

actionBar

Indicates whether the Steps in the Wizard will render their Buttons and Pager element.

Returns

\Kendo\UI\Wizard

Parameters

$value boolean

Example

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->actionBar(true);
?>

activate

Fires when a new step has been selected upon user interaction. For additional information check the activate event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->activate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onActivate(e) {
        // handle the activate event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->activate('onActivate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->activate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

contentLoad

Triggered when content is fetched from an AJAX request and has been loaded. For additional information check the contentLoad event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->contentLoad('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onContentLoad(e) {
        // handle the contentLoad event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->contentLoad('onContentLoad');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->contentLoad(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

contentPosition

The position of the Wizard step content according to the embedded Stepper widget.

Returns

\Kendo\UI\Wizard

Parameters

$value string

Example

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->contentPosition('value');
?>

done

Triggered when the "Done" action Button has been clicked For additional information check the done event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->done('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDone(e) {
        // handle the done event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->done('onDone');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->done(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

error

Triggered when an attempt to fetch step content with an AJAX request fails. The event will be fired only when the user clicks on the Previous or Next button, or navigates to another step using the Stepper. It will not be fired if the remote request is raised as a result of a Step.load() method call. For additional information check the error event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->error('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onError(e) {
        // handle the error event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->error('onError');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->error(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

formValidateFailed

Fired when the validateForms configuration option is set to true (default), and the validation of the Kendo UI Form on the current Wizard step fails when the user tries to navigate to another step. For additional information check the formValidateFailed event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->formValidateFailed('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onFormValidateFailed(e) {
        // handle the formValidateFailed event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->formValidateFailed('onFormValidateFailed');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->formValidateFailed(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

loadOnDemand

Indicates whether the step content will be loaded on demand when a given step is selected. Applicable when the step configuration has "contentUrl" set.

Returns

\Kendo\UI\Wizard

Parameters

$value boolean

Example

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->loadOnDemand(true);
?>

messages

Provides configuration options for the messages present in the Wizard widget.

Returns

\Kendo\UI\Wizard

Parameters

$value \Kendo\UI\WizardMessages|array

Example - using \Kendo\UI\WizardMessages

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$messages = new \Kendo\UI\WizardMessages();
$done = 'value';
$messages->done($done);
$wizard->messages($messages);
?>

Example - using array

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$done = 'value';
$wizard->messages(array('done' => $done));
?>

pager

Indicates whether the Steps in the Wizard will render their Pager element.

Returns

\Kendo\UI\Wizard

Parameters

$value boolean

Example

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->pager(true);
?>

reloadOnSelect

Indicates whether the step content will be reloaded on each navigation to given step. Applicable when the step configuration has "contentUrl" set.

Returns

\Kendo\UI\Wizard

Parameters

$value boolean

Example

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->reloadOnSelect(true);
?>

reset

Triggered when the "Reset" action Button has been clicked For additional information check the reset event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->reset('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onReset(e) {
        // handle the reset event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->reset('onReset');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->reset(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

select

Fires when the user clicks on the Stepper or clicks on "Previous"/"Next" action Buttons to select another step. For additional information check the select event documentation.

Returns

\Kendo\UI\Wizard

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->select('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelect(e) {
        // handle the select event.
    }
</script>
<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->select('onSelect');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->select(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

stepper

Provides configuration options for the Stepper instance of the Wizard widget.

Returns

\Kendo\UI\Wizard

Parameters

$value \Kendo\UI\WizardStepper|array

Example - using \Kendo\UI\WizardStepper

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$stepper = new \Kendo\UI\WizardStepper();
$indicator = true;
$stepper->indicator($indicator);
$wizard->stepper($stepper);
?>

Example - using array

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$indicator = true;
$wizard->stepper(array('indicator' => $indicator));
?>

addStep

Adds one or more WizardStep to the Wizard.

Returns

\Kendo\UI\Wizard

Parameters

$value[, $value2, ...] \Kendo\UI\WizardStep|array

Example - using \Kendo\UI\WizardStep

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$step = new \Kendo\UI\WizardStep();
$className = 'value';
$step->className($className);
$wizard->addStep($step);
?>

Example - using array

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$className = 'value';
$wizard->addStep(array('className' => $className));
?>

Example - adding more than one WizardStep

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$first  = new \Kendo\UI\WizardStep();
$second = new \Kendo\UI\WizardStep();
$wizard->addStep($first, $second);
?>

validateForms

Indicates whether the Wizard will automatically validate any Kendo Form configured for a Step. Validation will be executed upon Step navigation.

Returns

\Kendo\UI\Wizard

Parameters

$value boolean|\Kendo\UI\WizardValidateForms|array

Example - using boolean

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$wizard->validateForms(true);
?>

Example - using \Kendo\UI\WizardValidateForms

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$validateForms = new \Kendo\UI\WizardValidateForms();
$validateOnPrevious = true;
$validateForms->validateOnPrevious($validateOnPrevious);
$wizard->validateForms($validateForms);
?>

Example - using array

<?php
$wizard = new \Kendo\UI\Wizard('Wizard');
$validateOnPrevious = true;
$wizard->validateForms(array('validateOnPrevious' => $validateOnPrevious));
?>
In this article
Not finding the help you need?