2024-04-15 17:46:33 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @var \itguild\forms\ActiveForm $form ;
|
|
|
|
*/
|
|
|
|
|
|
|
|
use itguild\forms\inputs\TextInput;
|
|
|
|
use itguild\forms\inputs\TextArea;
|
|
|
|
|
2024-04-17 17:30:00 +03:00
|
|
|
$types = \itguild\forms\app\models\InputTypeModel::where("status", 1)->pluck('name', 'id')->toArray();
|
|
|
|
|
2024-04-15 17:46:33 +03:00
|
|
|
?>
|
|
|
|
|
|
|
|
<?php echo $form->beginForm("/admin/save-form"); ?>
|
|
|
|
<?php $form->field(TextInput::class, name: "title", params: [
|
|
|
|
'class' => "form-control",
|
|
|
|
'placeholder' => 'Название формы'
|
|
|
|
])
|
|
|
|
->setLabel("Название формы")
|
|
|
|
->render();
|
2024-04-16 17:13:42 +03:00
|
|
|
|
2024-04-17 17:30:00 +03:00
|
|
|
$form->field(TextInput::class, name: "perPage", params: [
|
2024-04-16 17:54:37 +03:00
|
|
|
'class' => "form-control",
|
|
|
|
'placeholder' => 'Perpage'
|
|
|
|
])
|
|
|
|
->setLabel("Количество выводимых записей на страницу")
|
|
|
|
->render();
|
2024-04-22 11:31:44 +03:00
|
|
|
|
2024-04-17 17:30:00 +03:00
|
|
|
$form->field(\itguild\forms\inputs\Select::class, name: "inputType", params: [
|
|
|
|
'class' => "form-control-sm",
|
|
|
|
'id' => "selectID",
|
|
|
|
'placeholder' => 'Параметры',
|
|
|
|
'options' => $types
|
|
|
|
])
|
|
|
|
->setLabel("Добавить поле")
|
|
|
|
->render();
|
2024-04-16 17:13:42 +03:00
|
|
|
?>
|
2024-04-22 11:31:44 +03:00
|
|
|
<button style="margin-top:15px" type="button" id="buttonAdd" class="btn btn-success " onclick="getValueSelect()" data-count=0>Добавить поле</button>
|
2024-04-16 17:13:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
2024-04-15 17:46:33 +03:00
|
|
|
$form->field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [
|
|
|
|
'class' => "btn btn-primary ",
|
|
|
|
'value' => 'Отправить',
|
|
|
|
'typeInput' => 'submit'
|
|
|
|
])
|
|
|
|
->render();
|
2024-04-16 17:13:42 +03:00
|
|
|
$form->endForm();
|
2024-04-15 17:46:33 +03:00
|
|
|
?>
|