Go to the source code of this file.
◆ in_form()
Example of how to process passwords.
Note that the value of Password is a Data\Password, not a string-primitive.
Definition at line 6 of file in_form.php.
7{
8
10 $ui =
$DIC->ui()->factory();
11 $renderer =
$DIC->ui()->renderer();
12 $request =
$DIC->http()->request();
13
14
15 $pwd_input = $ui->input()->field()->password("Password", "Value will be displayed...")
16 ->withRevelation(true);
17
18
19 $form = $ui->input()->container()->form()->standard('#', ['password' => $pwd_input]);
20
21
23 if ($request->getMethod() == "POST") {
24 $form = $form->withRequest($request);
26 }
27
28
29 return
30 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
31 $renderer->render($form);
32}
References $DIC, and $result.