https://github.com/humanintiative/yii2-tabularform
Tabular Form Widget
https://github.com/humanintiative/yii2-tabularform
form tabular widget yii2-extension
Last synced: 11 months ago
JSON representation
Tabular Form Widget
- Host: GitHub
- URL: https://github.com/humanintiative/yii2-tabularform
- Owner: HumanIntiative
- Created: 2017-12-14T09:41:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T09:00:12.000Z (over 6 years ago)
- Last Synced: 2025-02-09T22:29:11.570Z (about 1 year ago)
- Topics: form, tabular, widget, yii2-extension
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tabular Form Widget
========================
Tabular Form Widget
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist pkpudev/yii2-tabularform "*"
```
or add
```
"pkpudev/yii2-tabularform": "*"
```
to the require section of your `composer.json` file.
Usage
-----
Once the extension is installed, simply use it in your code by :
```php
= \pkpudev\widget\grid\TabularInput::widget([
'title'=>'Title',
'idField'=>'id',
'parentIdField'=>'parent_id',
'controls'=>[
new InputControl(['type'=>'textInput', 'name'=>'field_name1', 'title'=>'Input 1']),
new InputControl(['type'=>'dateInput', 'name'=>'field_name2', 'title'=>'Date 1']),
new InputControl(['type'=>'dropDownList', 'name'=>'field_name3', 'title'=>'Options 1', 'data'=>[
'', 6=>'Val 1', 12=>'Val 2',
]]),
],
'data'=>[
['id'=>1, 'parent_id'=>0, 'field_name1'=>null, 'field_name2'=>null, 'field_name3'=>null],
...
]
]); ?>
```
DatePicker
----
Get it here
````
"eternicode/bootstrap-datepicker": ">=v1.7.0"
````