form->fields->dbValue as source for the pdf data (as in the mailPdfHelper) // if we have an edit view, user inputs are always stored in database // Modified data are already stored in database // So we can safely get current data from the database $pdfRawData = $this->getDetail(); $this->pdfRawData = $pdfRawData; } private function getDetail() { $db = Factory::getDbO(); $app = Factory::getApplication(); $cIds = $app->input->get('cid', array(), 'ARRAY'); ArrayHelper::toInteger($cIds); $id = (int) $cIds[0]; $query = $db->getQuery(true); $query->select('*') ->from($db->quoteName('#__visforms_' . $this->form->id)) ->where($db->quoteName('id') . " = " . $id); try { $db->setQuery($query); $detail = $db->loadObject(); } catch (\Exception $ex) { return false; } return $detail; } }