3 declare(strict_types=1);
15 $ui = $DIC->ui()->factory();
16 $renderer = $DIC->ui()->renderer();
19 $text_input = $ui->input()->field()->text(
"Basic Input",
"Just some basic input 20 with some error attached.")
21 ->withError(
"Some error");
24 $form = $ui->input()->container()->form()->standard(
"#", [$text_input]);
27 return $renderer->render($form);
with_error()
Example show how to create and render a basic text input field with an error attached to it...