Go to the source code of this file.
|
| base () |
| Example show how to create and render a basic textarea field and attach it to a form. More...
|
|
◆ base()
Example show how to create and render a basic textarea field and attach it to a form.
Definition at line 6 of file base.php.
References $DIC, and $result.
10 $ui = $DIC->ui()->factory();
11 $request = $DIC->http()->request();
12 $renderer = $DIC->ui()->renderer();
15 $textarea_input = $ui->input()->field()->textarea(
"Textarea Input",
"Just a textarea input.");
18 $DIC->ctrl()->setParameterByClass(
19 'ilsystemstyledocumentationgui',
23 $form_action = $DIC->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui');
26 $form = $ui->input()->container()->form()->standard($form_action, [$textarea_input]);
29 if ($request->getMethod() ==
"POST" && $request->getQueryParams()[
'example_name'] ==
'base') {
30 $form = $form->withRequest($request);
38 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
39 $renderer->render($form);