ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_dedicated_name_and_path.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
34 {
35  global $DIC;
36  $ui = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  $street = $ui->input()->field()
40  ->text("Street", "Street and No.")
41  ->withDedicatedName('street');
42 
43  $city = $ui->input()->field()
44  ->text("City")
45  ->withDedicatedName('city');
46 
47  // This creates inputs named 'address/street' and 'address/city'
48  $address = $ui->input()->field()
49  ->group([$street, $city], "Address")
50  ->withDedicatedName('address');
51 
52  $form = $ui->input()->container()->form()->standard("", [$address]);
53  return $renderer->render($form);
54 }
$renderer
global $DIC
Definition: shib_login.php:22
with_dedicated_name_and_path()
description: > Example showing Inputs with dedicated names that are contained within a named group...