11 $ui = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
13 $request = $DIC->http()->request();
18 $duration = $ui->input()->field()->duration(
"Pick a time-span",
"This is the byline text");
19 $time = $duration->withTimeOnly(
true)->withRequired(
true);
21 ->withTimezone(
'America/El_Salvador')
23 ->withByline(
'timezone and both time and date');
26 $form = $ui->input()->container()->form()->standard(
29 'duration' => $duration,
31 'timezone' => $timezone,
32 'disabled' => $duration->withLabel(
'disabled')->withDisabled(
true)
37 if ($request->getMethod() ==
"POST") {
38 $form = $form->withRequest($request);
39 $groups = $form->getInputs();
40 foreach ($groups as $group) {
41 if ($group->getError()) {
54 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
55 $renderer->render($form);