Skip to content

Commit 8259899

Browse files
committed
fix(targetchange): fix creation if relation between change and form answer
Signed-off-by: btry <tbugier@teclib.com>
1 parent 77b2174 commit 8259899

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

inc/form_answer.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ public function saveAnswers($data) {
748748
if (!$this->generateTarget()) {
749749
Session::addMessageAfterRedirect(__('Cannot generate targets!', 'formcreator'), true, ERROR);
750750

751+
// TODO: find a way to validate the answers
752+
// It the form is not being validated, nothing gives the power to anyone to validate the answers
751753
$this->update([
752754
'id' => $this->getID(),
753755
'status' => 'waiting',

inc/targetchange.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
11871187
$itemlink->add([
11881188
'itemtype' => 'PluginFormcreatorForm_Answer',
11891189
'items_id' => $formanswer->fields['id'],
1190-
'changess_id' => $changeID,
1190+
'changes_id' => $changeID,
11911191
]);
11921192

11931193
$this->attachDocument($formanswer->getID(), Change::class, $changeID);

0 commit comments

Comments
 (0)