firstPHP/views/admin/_form_add_fields_ajax.php

30 lines
793 B
PHP
Raw Normal View History

2024-04-17 17:30:00 +03:00
<?php
/**
*
* @var ActiveForm $form
*
*/
use itguild\forms\ActiveForm;
use itguild\forms\inputs\Select;
use itguild\forms\inputs\TextArea;
use itguild\forms\inputs\TextInput;
$form->field(Select::class, name: "selectItem", params: [
'class' => "form-control", "options" => ["textInput", "textArea", "checkBox", "button", "radioButton", "select", "label"]
])
->setLabel("Выберите тип инпута")
->render();
$form->field(TextInput::class, name: "name", params: [
'class' => "form-control",
'placeholder' => 'Name'
])
->setLabel("Имя поля")
->render();
$form->field(TextInput::class, name: "value", params: [
'class' => "form-control",
'placeholder' => 'Значение value'
])
->setLabel("Значение")
->render();