PHP code example of meysampg / yii2-formbuilder

1. Go to this page and download the library: Download meysampg/yii2-formbuilder 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/ */

    

meysampg / yii2-formbuilder example snippets


use meysampg\formbuilder\FormBuilder;

<?= FormBuilder::widget(); 

<?= FormBuilder::widget([
    'data' => [
        [
            "type" => "header",
            "subtype" => "h1",
            "label" => "Header",
            "class" => "header",
        ],
        [
            "type" => "button",
            "label" => "Button",
            "subtype" => "button",
            "class" => "button-input btn btn-warning",
            "name" => "button-1475845417456",
            "style" => "warning",
        ],
    ],
]); 

<?= FormBuilder::widget([
    'dataType' => 'json' 
]); 

<?= FormBuilder::widget([
    'messages' => [
        "autocomplete" => "Autocomplete 23",
    ],
]); 

<?= FormBuilder::widget([
    'language' => 'fa-IR',
]);