10 $ui = $DIC->ui()->factory();
11 $renderer = $DIC->ui()->renderer();
15 $multi_select_input = $ui->input()->field()->tag(
17 [
'Interesting',
'Boring',
'Animating',
'Repetitious'],
22 $DIC->ctrl()->setParameterByClass(
23 ilSystemStyleDocumentationGUI::class,
27 $DIC->ctrl()->saveParameterByClass(
28 ilSystemStyleDocumentationGUI::class,
32 $form_action = $DIC->ctrl()->getFormActionByClass(ilSystemStyleDocumentationGUI::class);
33 $form = $ui->input()->container()->form()->standard($form_action, [$multi_select_input]);
36 if (
$request->getMethod() ===
"POST" &&
$request->getQueryParams()[
'example_name'] ===
'tag_inputs') {
44 return "<pre>" . print_r(
$result,
true) .
"</pre><br/>" . $renderer->render(
$form);
foreach($paths as $path) $request
base_with_data()
Example show how to create and render a basic tag input field and attach it to a form.
if(isset($_POST['submit'])) $form