From 8277822d5b42cb0851828d13ecc072632fbbe0b6 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 1 Apr 2021 08:38:02 +0200 Subject: [PATCH] fix(formanswer): load answers when validating a formanswer Signed-off-by: Thierry Bugier --- inc/formanswer.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/formanswer.class.php b/inc/formanswer.class.php index 66844cf85..2efb93b89 100644 --- a/inc/formanswer.class.php +++ b/inc/formanswer.class.php @@ -894,15 +894,15 @@ public function getFullForm($richText = false): string { } // retrieve answers - $form = $this->getForm(); - $fields = $form->getFields(); + $formFk = PluginFormcreatorForm::getForeignKeyField(); + $fields = $this->getQuestionFields($this->fields[$formFk]); + $this->deserializeAnswers(); // TODO: code very close to PluginFormcreatorAbstractTarget::parseTags() (factorizable ?) // compute all questions $questionTable = PluginFormcreatorQuestion::getTable(); $sectionTable = PluginFormcreatorSection::getTable(); - $formFk = PluginFormcreatorForm::getForeignKeyField(); $sectionFk = PluginFormcreatorSection::getForeignKeyField(); $questions = $DB->request([ 'SELECT' => [