PHP code example of pkpudev / yii2-tabularform

1. Go to this page and download the library: Download pkpudev/yii2-tabularform library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pkpudev / yii2-tabularform example snippets


<?= \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],
		...
	]
]); 

php composer.phar