-
Notifications
You must be signed in to change notification settings - Fork 13
Single Model Across Steps
Coackroach edited this page Jan 19, 2020
·
2 revisions
To use a single model across steps you can use the disabled
and only
options intelligently, make sure you are not using both of these options for the same step.
use buttflattery\formwizard\FormWizard;
echo FormWizard::widget([
'steps' => [
[
'model' => $shootsModel,
'title' => 'Shoot Description',
'description' => 'Provide description only',
'formInfoText' => 'The date fields(created_at, updated_at), and shoot_type, are disabled for this step by using the `disabled` option.',
'fieldConfig' => [
'except' => ['created_at', 'updated_at', 'shoot_type'], // all fields except these will be added in the step
]
],
[
'model' => $shootsModel,
'title' => 'Shoot Dates',
'description' => 'Provide dates only',
'formInfoText' => 'Provide Shoot Dates',
'fieldConfig' => [
'only' => ['created_at', 'updated_at', 'shoot_type'], // only these field will be added in the step, rest all will be hidden/ignored.
]
]
]
]);
- 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)