firstPHP/index.php
2024-03-15 14:17:25 +03:00

34 lines
1.4 KiB
PHP

<?php
ini_set("display_errors", true);
error_reporting(-1);
require_once "src/traits/CreateParams.php";
require_once "src/traits/CreateOption.php";
require_once "src/inputs/Radio.php";
require_once "src/inputs/Select.php";
require_once "src/inputs/Button.php";
require_once "src/inputs/TextInput.php";
require_once "src/inputs/TextArea.php";
require_once "src/inputs/Checkbox.php";
require_once "src/inputs/Label.php";
require_once "src/debug/Debug.php";
require_once "src/Form.php";
use src\Form;
$form = new Form();
$form->beginForm("tsad");
$form->textInput("phone", ['placeholder' => 'Введите телефон', 'class' => 'form-group']);
$form->textInput("email", ['placeholder' => 'Введите email']);
$form->textInput("name", ['type' => 'number']);
$form->checkBox("Button", "1", ["class" => 'sdsa', "id" => "b1"]);
$form->checkBox("Button", "2", ["class" => 'sdsa', "id" => "b1"]);
$form->checkBox("Button", "3", ["class" => 'sdsa', "id" => "b1"]);
$form->label("RadioButton", ["for" => "r2"]);
$form->radio("name1", ["id" => "r2"]);
$form->label("RadioButton", ["for" => "r3"]);
$form->radio("name1", ["id" => "r3"]);
$form->textarea("textarea", "dsadasads", ["id" => "t1"]);
$form->select("select", ["class1" => "option", "class2" => "b2", "class3" => "b4"], 'class2', ["id" => "s1"]);
$form->button('button', "Кнопка", ["id" => "button"]);
$form->endForm();