N°8772 - form controller

This commit is contained in:
Eric Espie
2025-12-04 12:10:04 +01:00
parent 4349303a78
commit ba1d62a147
8 changed files with 50 additions and 15 deletions

View File

@@ -18,14 +18,17 @@ class FormsController extends Controller
{
public const ROUTE_NAMESPACE = 'forms';
public function OperationDisplayForm()
public function OperationDashletConfiguration()
{
try {
$oRequest = $this->getRequest();
$sId = $oRequest->query->get('dashlet_code');
// Get the form block from the service (and the compiler)
$oFormBlock = FormBlockService::GetInstance()->GetFormBlockById('VerySimpleForm');
$oFormBlock = FormBlockService::GetInstance()->GetFormBlockById($sId);
$oBuilder = $this->GetFormBuilder($oFormBlock, []);
$oForm = $oBuilder->getForm();
$oForm->handleRequest($this->GetRequest());
$oForm->handleRequest($oRequest);
if ($oForm->isSubmitted()) {
if ($oForm->isValid()) {
@@ -46,6 +49,7 @@ class FormsController extends Controller
$this->DisplayPage([
'form' => $oForm->createView(),
'sAction' => '',
], 'BasicForm');
} catch (Exception $e) {