Skip to content

Commit

Permalink
Set catid from current contact to contact form data
Browse files Browse the repository at this point in the history
  • Loading branch information
joomdonation committed Feb 12, 2022
1 parent 9ac732f commit 5949deb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/com_contact/src/Model/ContactModel.php
Expand Up @@ -164,11 +164,8 @@ protected function loadFormData()
$data['language'] = Factory::getLanguage()->getTag();
}

// Add contact id to contact form data, so fields plugin can work properly
if (empty($data['catid']))
{
$data['catid'] = $this->getItem()->catid;
}
// Add contact catid to contact form data, so fields plugin can work properly
$data['catid'] = $this->getItem()->catid;

$this->preprocessData('com_contact.contact', $data);

Expand Down

0 comments on commit 5949deb

Please sign in to comment.