ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
16 function base()
17 {
18  //Step 0: Declare dependencies.
19  global $DIC;
20  $ui = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  //Step 1: Define the input field.
24  $pwd_input = $ui->input()->field()->password("Password", "enter your password here");
25 
26  //Step 2: Define the form and attach the field.
27  $form = $ui->input()->container()->form()->standard("#", [$pwd_input]);
28 
29  //Step 4: Render the form.
30  return $renderer->render($form);
31 }
$renderer
base()
description: > Example of how to create and render a basic password field and attach it to a form...
Definition: base.php:16
global $DIC
Definition: shib_login.php:25