diff --git a/components/com_contact/views/contact/view.html.php b/components/com_contact/views/contact/view.html.php index 4ad6a873a558e..eeb64f1f70bd5 100644 --- a/components/com_contact/views/contact/view.html.php +++ b/components/com_contact/views/contact/view.html.php @@ -72,10 +72,13 @@ public function display($tpl = null) $item = $this->get('Item'); $state = $this->get('State'); - if (empty($item->catid)) - { - $app->setUserState('com_contact.contact.data', array('catid' => $item->catid)); - } + // Get submitted values + $data = $app->getUserState('com_contact.contact.data', array()); + + // Add catid for selecting custom fields + $data['catid'] = $item->catid; + + $app->setUserState('com_contact.contact.data', $data); $this->form = $this->get('Form');