getRequest(); $sDashletId = $oRequest->query->get('dashlet_code'); // Get the form block from the service (and the compiler) $oFormBlock = FormBlockService::GetInstance()->GetFormBlockById($sDashletId); $oBuilder = $this->GetFormBuilder($oFormBlock, []); $oForm = $oBuilder->getForm(); $oForm->handleRequest($oRequest); if ($oForm->isSubmitted()) { if ($oForm->isValid()) { IssueLog::Info('form is valid'); } // Retrieve form data $aData = $oRequest->request->all($sDashletId); // Compute blocks to redraw $aBlocksToRedraw = FormTypeHelper::ComputeBlocksToRedraw($oFormBlock, $oForm, $aData['_turbo_trigger']); // Display turbo response $this->DisplayTurboAjaxPage($aBlocksToRedraw); return; } $this->DisplayPage([ 'form' => $oForm->createView(), 'sAction' => '', ], 'BasicForm'); } catch (Exception $e) { ItopSdkFormDemonstratorLog::Exception($e->getMessage(), $e); $this->DisplayPage([ 'sError' => $e->getMessage(), ], 'BasicForm'); return; } } }