Go to the source code of this file.
|
| base () |
| Example show how to create and render a basic form with one input. More...
|
|
◆ base()
Example show how to create and render a basic form with one input.
This example does not contain any data processing.
Definition at line 6 of file base.php.
7{
8
10 $ui =
$DIC->ui()->factory();
11 $renderer =
$DIC->ui()->renderer();
12
13
14 $text_input = $ui->input()->field()->text("Basic Input", "Just some basic input");
15
16
17
18 $section1 = $ui->input()->field()->section([$text_input], "Section 1", "Description of Section 1");
19
20
21 $form = $ui->input()->container()->form()->standard(
"#", [$section1]);
22
23
24 return $renderer->render(
$form);
25}
if(isset($_POST['submit'])) $form
References $DIC, and $form.