19 declare(strict_types=1);
48 $ui = $DIC->ui()->factory();
50 $request = $DIC->http()->request();
53 $number_input = $ui->input()->field()
54 ->numeric(
"Some Number",
"Put in a number.")
57 $number_input2 = $number_input->withRequired(
true)->withValue(
'');
60 $form = $ui->input()->container()->form()->standard(
'#', [
61 'n1' => $number_input,
62 'n2' => $number_input2
66 if ($request->getMethod() ==
"POST") {
67 $form = $form->withRequest($request);
68 $result = $form->getData();
70 $result =
"No result yet.";
75 "<pre>" . print_r($result,
true) .
"</pre><br/>" .