11 $ui = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
25 $select = $ui->input()->field()->select(
"Choose an Option",
$options,
"This is the byline text")->withRequired(
true);
28 $ctrl->setParameterByClass(
29 'ilsystemstyledocumentationgui',
30 'example_name_required',
33 $form_action = $DIC->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui');
34 $form = $ui->input()->container()->form()->standard($form_action, [$select]);
38 &&
$request->getQueryParams()[
'example_name_required'] ==
"select") {
47 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
48 $renderer->render(
$form);
foreach($paths as $path) $request
with_required()
Base example showing how to plug a Select into a form.
if(isset($_POST['submit'])) $form