3 declare(strict_types=1);
22 $request = $DIC->http()->request();
23 $factory = $DIC->ui()->factory();
26 $modal = $factory->modal()->roundtrip(
27 'roundtrip with form',
30 $factory->input()->field()->text(
'some text'),
31 $factory->input()->field()->numeric(
'some numbere'),
37 $open = $factory->button()->standard(
'open modal',
'#')->withOnClick($modal->getShowSignal());
41 if (
'POST' === $request->getMethod()) {
42 $modal = $modal->withRequest($request);
43 $data = $modal->getData();
45 $data =
'no results yet.';
49 '<pre>' . print_r(
$data,
true) .
'</pre>' .
show_form_in_modal()
description: > Example for rendering a round trip modal.