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 b49cca3a1bd3df232383edd9f3f84df33954083a..751db130fb1c9343f16dd598a0661486727f8cc9 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -546,6 +546,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)