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