A simple Yii2 extended ActiveForm widget.
- Bootstrap daterangepicker for date picker fields
- Select2 for dropDownList
- Summernote for text editor
- Yii2
- PHP 5.4+
The preferred way to install this extension is through composer.
php composer.phar require mdbhayani/yii2-activeform "*"
After the extension is installed, use it in your code wherever you need activeform.
Following is the example of a single date input field. It uses jquery daterangepicker for the input field.
echo $form->field($model, "formFieldName")->singleDateInput();
Following is the example of a date range input field. It uses jquery daterangepicker for the input field.
echo $form->field($model, "formFieldName")->dateRangeInput();
Following is the example of a drop down field. It uses jquery select2 for the input field.
echo $form->field($model, "formFieldName")->dropDownList();
Following is the example of a text editor field. It uses summernote for the textarea field.
echo $form->field($model, "formFieldName")->wysiwyg();