From 283f86ff3d6be8a7f83ef617c28dec3f04cfa699 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 15 Jan 2014 08:54:36 -0600 Subject: [PATCH] Drop the cdata table on field type change If a field on the ticket details form changes type, recreate the cdata table --- include/class.dynamic_forms.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 95d8712db..1ee982edc 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -303,7 +303,8 @@ Signal::connect('model.updated', array('TicketForm', 'dropDynamicDataView'), 'DynamicFormField', // TODO: Lookup the dynamic form to verify {type == 'T'} - function($o, $d) { return isset($d['dirty']) && isset($d['dirty']['name']); }); + function($o, $d) { return isset($d['dirty']) + && (isset($d['dirty']['name']) || isset($d['dirty']['type'])); }); require_once(INCLUDE_DIR . "class.json.php"); -- GitLab