ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
disabled.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
19 function disabled()
20 {
21  //Step 0: Declare dependencies
22  global $DIC;
23  $ui = $DIC->ui()->factory();
24  $renderer = $DIC->ui()->renderer();
25 
26  //Step 1: Define the text input field
27  $text_input = $ui->input()->field()->text("Disabled Input", "Just some disabled input")->withDisabled(true);
28 
29  //Step 2: Define the form and attach the section.
30  $form = $ui->input()->container()->form()->standard("#", [$text_input]);
31 
32  //Step 4: Render the form with the text input field
33  return $renderer->render($form);
34 }
$renderer
global $DIC
Definition: shib_login.php:25
disabled()
description: > The example shows how to create and render a disabled text input field and attach it ...
Definition: disabled.php:19