45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* @var \itguild\forms\ActiveForm $form ;
|
|
*/
|
|
|
|
use itguild\forms\inputs\TextInput;
|
|
use itguild\forms\inputs\TextArea;
|
|
|
|
?>
|
|
|
|
<?php echo $form->beginForm("/admin/save-form"); ?>
|
|
<?php $form->field(TextInput::class, name: "title", params: [
|
|
'class' => "form-control",
|
|
'placeholder' => 'Название формы'
|
|
])
|
|
->setLabel("Название формы")
|
|
->render();
|
|
|
|
$form->field(TextInput::class, name: "title", params: [
|
|
'class' => "form-control",
|
|
'placeholder' => 'Perpage'
|
|
])
|
|
->setLabel("Количество выводимых записей на страницу")
|
|
->render();
|
|
$form->field(TextArea::class, name: "title", params: [
|
|
'class' => "form-control",
|
|
'placeholder' => 'Параметры'
|
|
])
|
|
->setLabel("Параметры")
|
|
->render();
|
|
?>
|
|
<button style="margin-top:15px" type="button" id="buttonAdd" class="btn btn-primary form-control" onclick="ajaxRequest()">Добавить поле</button>
|
|
|
|
|
|
|
|
<?php
|
|
$form->field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [
|
|
'class' => "btn btn-primary ",
|
|
'value' => 'Отправить',
|
|
'typeInput' => 'submit'
|
|
])
|
|
->render();
|
|
$form->endForm();
|
|
?>
|