-
Notifications
You must be signed in to change notification settings - Fork 15
Custom Field Order
Coackroach edited this page Jan 19, 2020
·
2 revisions
The field order in the steps works in the following way.
-
Checks the
fieldOrderarray if provided the given fields will have the preference in the step according to their order, those not mentioned will be dependent on the order they are retrieved from the model. -
If the
fieldOrderis not provided then the fields will be ordered according to the order in thefieldConfigoption. -
If none of the above is used then the default field order in which the fields are retrieved from the model will be used.
You can assign a custom field order for the step using the fieldOrder option under the steps.
//View code
use buttflattery\formwizard\FormWizard;
echo FormWizard::widget([
'formOptions'=>[
'id'=>'my_form_ajax',
'enableClientValidation'=>false,
'enableAjaxValidation'=>true,
],
'steps' => [
[
'model' => $shootsModel,
'title' => 'My Shoots',
'description' => 'Add your shoots',
'formInfoText' => 'Fill all fields'
'fieldOrder'=>['name','description','active']
],
]
]);- 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)