diff --git a/include/class.company.php b/include/class.company.php index c9aa22f04af3889ea22b564f06ffdf2dff936a71..049ecbb215a0abcbe1d6d25b0d5842c26fd97850 100644 --- a/include/class.company.php +++ b/include/class.company.php @@ -48,7 +48,7 @@ class Company { } function getInfo() { - return $this->getForm()->getClean(); + return $this->getForm()->getSaved(); } function getName() { diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 206db1ef9a537f6be420ee55175f265208048cc7..64e1cbbffaa19aa2a1fd0c14f90d1cf05de4db21 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -549,6 +549,16 @@ class DynamicFormEntry extends VerySimpleModel { return $this->_clean; } + function getSaved() { + $info = array(); + foreach ($this->getAnswers() as $a) { + $field = $a->getField(); + $info[$field->get('id')] + = $info[$field->get('name')] = $a->getValue(); + } + return $info; + } + function forTicket($ticket_id, $force=false) { static $entries = array(); if (!isset($entries[$ticket_id]) || $force)