diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 59605162dbc48e7227f89d651d4753340057cad4..174c93153d6d6646a1674d3f6e948267637f8c35 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1008,10 +1008,12 @@ class DynamicFormEntryAnswer extends VerySimpleModel { } function getValue() { - if (!$this->_value && isset($this->value)) - $this->_value = $this->getField()->to_php( - $this->get('value'), $this->get('value_id')); - return $this->_value; + $value = $this->getField()->to_php( + $this->get('value'), $this->get('value_id')); + if (!$value && $this->getEntry()->getSource()) { + return $this->getEntry()->getField( + $this->getField()->get('name'))->getClean(); + } } function getIdValue() { diff --git a/include/class.ticket.php b/include/class.ticket.php index 0dd0759524db699f4645db80604be81dfb0c4195..c4b6d3e94a36cb9c38b83ad0a411f4779151c9d9 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2367,6 +2367,7 @@ class Ticket { // Create and verify the dynamic form entry for the new ticket $form = TicketForm::getNewInstance(); + $form->setSource($vars); // If submitting via email, ensure we have a subject and such foreach ($form->getFields() as $field) { $fname = $field->get('name');