GetFormBlockById('VerySimpleForm'); $oBuilder = $this->GetFormBuilder($oFormBlock, []); $oForm = $oBuilder->getForm(); $oForm->handleRequest($this->GetRequest()); if ($oForm->isSubmitted()) { if ($oForm->isValid()) { IssueLog::Info('form is valid'); } // Retrieve form data $aData = $oForm->getData(); // Compute blocks to redraw $aBlocksToRedraw = FormTypeHelper::ComputeBlocksToRedraw($oFormBlock, $oForm, $aData['_turbo_trigger']); // Display turbo response $this->DisplayTurboAjaxPage($aBlocksToRedraw); return; } $this->DisplayPage([ 'form' => $oForm->createView(), ], 'BasicForm'); } catch (Exception $e) { ItopSdkFormDemonstratorLog::Exception($e->getMessage(), $e); $this->DisplayPage([ 'sError' => $e->getMessage(), ], 'BasicForm'); return; } } }