Go to the source code of this file.
|
| base () |
| Base example showing how to plug a checkbox into a form. More...
|
|
◆ base()
Base example showing how to plug a checkbox into a form.
Definition at line 5 of file base.php.
References $DIC, and $result.
9 $ui = $DIC->ui()->factory();
10 $renderer = $DIC->ui()->renderer();
11 $request = $DIC->http()->request();
14 $checkbox_input = $ui->input()->field()->checkbox(
"Checkbox",
"Check or not.")
18 $form = $ui->input()->container()->form()->standard(
'#', [ $checkbox_input]);
22 if ($request->getMethod() ==
"POST") {
23 $form = $form->withRequest($request);
31 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
32 $renderer->render($form);