-
Notifications
You must be signed in to change notification settings - Fork 13
Enable Preview Step
Coackroach edited this page Feb 23, 2020
·
2 revisions
When enabled using the "enablePreview"=>true
in the main options of the form wizard, after adding all the steps the last step which previews all the inputs entered for the steps. The user can navigate to the step by clicking on the list label inside the preview window. This option is turned off by default, and users will need to specify the enablePreview
in the main options.
You can customize the preview steps elements using the following properties
-
previewEmptyText (string)
: Text used for showing the value for the empty inputs, default isNA
. -
classListGroup (string)
: Css class for the list group defaults to'list-group'
. -
classListGroupHeading (string)
: Css class for the list group heading element, defaults to'list-group-heading'
. -
classListGroupItem (string)
: Css class for the list group item, defaults to'list-group-item-success'
. -
classListGroupBadge (string)
: Css class for the list group badge that displays the input label, defaults to'success'
.
You just need to use the enablePreview
option and assign true
under the main options see the code below.
echo FormWizard::widget([
'enablePreview'=>true,
'classListGroup' => 'list-group',
'classListGroupHeading' => 'list-group-heading',
'classListGroupItem' => 'list-group-item-info',
'classListGroupBadge' => 'danger',
'steps' => [
[
'model' => new AddressBook(),
'title' => 'Address book',
'description' => 'Add Addresses',
'formInfoText' => 'Fill all fields'
],
[
'model' => new Shoots(),
'title' => 'My Shoots',
'description' => 'Add your shoots',
'formInfoText' => 'Fill All fields'
]
]
]);
It looks like below
- Get Running with Minimal Options
- Disable ActiveForm Validation
- Enable Ajax Validation
- Add Custom Buttons
- Widget Constants
- Customizing Form Fields
- Configuring File Uploads
- Custom Field Order
- Single Model Across Steps
- Multiple models in a single step
-
Tabular Steps-(New)
- Working With Widgets
- Limiting Rows
- Dependent Inputs Since v1.7.2
- Skip-able Step-(Since v1.5.0)
- Enable Preview Step-(New)
- Group Fields-(New)
- Enable Form Persistence-(New)
- Enable Edit Mode - (Since v1.6.4)