ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
disabled.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
35 function disabled()
36 {
37  //Step 0: Declare dependencies
38  global $DIC;
39  $ui = $DIC->ui()->factory();
40  $renderer = $DIC->ui()->renderer();
41 
42  //Step 1: Define the text input field
43  $text_input = $ui->input()->field()->text("Disabled Input", "Just some disabled input")->withDisabled(true);
44 
45  //Step 2: Define the form and attach the section.
46  $form = $ui->input()->container()->form()->standard("#", [$text_input]);
47 
48  //Step 4: Render the form with the text input field
49  return $renderer->render($form);
50 }
$renderer
global $DIC
Definition: shib_login.php:22
disabled()
description: > The example shows how to create and render a disabled text input field and attach it ...
Definition: disabled.php:35