ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_disabled.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
16 function with_disabled()
17 {
18  global $DIC;
19  $ui = $DIC->ui()->factory();
20  $renderer = $DIC->ui()->renderer();
21  $request = $DIC->http()->request();
22  $data = new \ILIAS\Data\Factory();
23 
24  $group1 = $ui->input()->field()->group([$ui->input()->field()->text("Item 1", "Just some field")], "Group 1");
25  $group2 = $ui->input()->field()->group([$ui->input()->field()->text("Item 2", "Just some field")], "Group 2");
26 
27  $sg = $ui->input()->field()->switchableGroup(
28  [$group1,$group2],
29  "Disabled Switchable Group",
30  "nothing to pick here."
31  )
32  ->withDisabled(true);
33 
34  return $renderer->render($sg);
35 }
$renderer
with_disabled()
description: > Example showing how a dependent group (aka sub form) might be attached to a radio whi...
global $DIC
Definition: shib_login.php:25