From 9d1d9116ddc3c8270c79cb6ca705f075d74f26e7 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 22 Jun 2015 14:31:09 -0500
Subject: [PATCH] forms: Ensure custom data fields are connected to data

This fixes a strange issue where the first field of a custom form stapled to
a ticket is not populated with data sourced from the API.
---
 include/class.dynamic_forms.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php
index 32df6570a..15968a26d 100644
--- a/include/class.dynamic_forms.php
+++ b/include/class.dynamic_forms.php
@@ -999,6 +999,7 @@ class DynamicFormEntry extends VerySimpleModel {
             // entry-id if necessary
             $a->set('entry_id', $this->get('id'));
             try {
+                $field->setForm($this);
                 $val = $field->to_database($field->getClean());
             }
             catch (FieldUnchanged $e) {
-- 
GitLab