ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
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 
33 function disabled()
34 {
35  global $DIC;
36  $ui = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  //define options.
40  $options = array(
41  "1" => "Pick 1",
42  "2" => "Pick 2",
43  "3" => "Pick 3",
44  "4" => "Pick 4",
45  );
46 
47  $multi = $ui->input()->field()->multiselect("Take your picks", $options, "This is the byline text")
48  ->withValue(['2','4'])
49  ->withDisabled(true);
50 
51  $form = $ui->input()->container()->form()->standard('#', ['multi' => $multi]);
52  return $renderer->render($form);
53 }
$renderer
disabled()
description: > This example shows an disabled Multi Select Input.
Definition: disabled.php:33
global $DIC
Definition: shib_login.php:22