ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
with_dedicated_name_and_path.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
12 {
13  global $DIC;
14  $ui = $DIC->ui()->factory();
15  $renderer = $DIC->ui()->renderer();
16 
17  $street = $ui->input()->field()
18  ->text("Street", "Street and No.")
19  ->withDedicatedName('street');
20 
21  $city = $ui->input()->field()
22  ->text("City")
23  ->withDedicatedName('city');
24 
25  // This creates inputs named 'address/street' and 'address/city'
26  $address = $ui->input()->field()
27  ->group([$street, $city], "Address")
28  ->withDedicatedName('address');
29 
30  $form = $ui->input()->container()->form()->standard("", [$address]);
31  return $renderer->render($form);
32 }
global $DIC
Definition: feed.php:28
with_dedicated_name_and_path()
Example showing Inputs with dedicated names that are contained within a named group.