9 $ui =
$DIC->ui()->factory();
10 $renderer =
$DIC->ui()->renderer();
11 $request =
$DIC->http()->request();
15 $radio = $ui->input()->field()->radio(
"Radio",
"Cannot check an option")
16 ->withOption(
'value1',
'label1')
17 ->withOption(
'value2',
'label2')
18 ->withOption(
'value3',
'label3')
23 $form = $ui->input()->container()->form()->standard(
'#', [
'radio' => $radio]);
27 if ($request->getMethod() ==
"POST") {
28 $form = $form->withRequest($request);
36 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
37 $renderer->render($form);
disabled()
Example showing how to plug a disabled checkbox into a form.
An exception for terminatinating execution or to throw for unit testing.