getRequest(); $sDashletId = $oRequest->query->get('dashlet_code'); // Get the form block from the service (and the compiler) $oFormBlock = FormBlockService::GetInstance()->GetFormBlockById($sDashletId, 'Dashlet'); $oBuilder = $this->GetFormBuilder($oFormBlock, []); $oForm = $oBuilder->getForm(); $oForm->handleRequest($oRequest); if ($oForm->isSubmitted()) { if ($oForm->isValid()) { IssueLog::Info('form is valid'); } // Compute blocks to redraw $this->HandleFormSubmitted($oFormBlock, $oForm); return; } // $this->DisplayPage([ // 'form' => $oForm->createView(), // 'sAction' => utils::GetAbsoluteUrlAppRoot().'pages/UI.php?route=forms.dashlet_configuration&dashlet_code='.urlencode($sDashletId), // ], 'itop_form'); } catch (Exception $e) { ItopSdkFormDemonstratorLog::Exception($e->getMessage(), $e); $this->DisplayPage([ 'sControllerError' => $e->getMessage(), ], 'itop_error_update', Controller::ENUM_PAGE_TYPE_TURBO_FORM_AJAX); return; } } }