element('genericElements/Form/genericForm', [ 'entity' => null, 'ajax' => false, 'raw' => true, 'data' => [ 'fields' => [ ], 'submit' => [ 'action' => $this->request->getParam('action') ] ] ]); $formHTML = sprintf('
%s
', $form); $bodyMessage = h($question ?? ''); $bodyHTML = sprintf('%s%s', $formHTML, $bodyMessage); $defaultOptions = [ 'size' => 'lg', 'title' => isset($title) ? h($title) : __('Confirm'), 'type' => 'confirm', 'confirmButton' => [ 'text' => !empty($actionName) ? h($actionName) : __('Confirm'), 'variant' => 'primary', ], ]; $modalOptions = array_merge($defaultOptions, $modalOptions ?? []); $modalOptions['bodyHtml'] = $bodyHTML; echo $this->Bootstrap->modal($modalOptions);