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 
17 function disabled()
18 {
19  global $DIC;
20  $ui = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  //define options.
24  $options = array(
25  "1" => "Pick 1",
26  "2" => "Pick 2",
27  "3" => "Pick 3",
28  "4" => "Pick 4",
29  );
30 
31  $multi = $ui->input()->field()->multiselect("Take your picks", $options, "This is the byline text")
32  ->withValue(['2','4'])
33  ->withDisabled(true);
34 
35  $form = $ui->input()->container()->form()->standard('#', ['multi' => $multi]);
36  return $renderer->render($form);
37 }
$renderer
disabled()
description: > This example shows an disabled Multi Select Input.
Definition: disabled.php:17
global $DIC
Definition: shib_login.php:25