}
// build tags and groups
- CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm($this, 0, CRM_Contact_Form_Edit_TagsAndGroups::ALL,
+ CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm($this, $this->getContactID(), CRM_Contact_Form_Edit_TagsAndGroups::ALL,
FALSE, NULL, 'Group(s)', 'Tag(s)', NULL, 'select');
// build location blocks.
$form->addOptionalQuickFormElement('group');
// NYSS 5670
if (!$contactId && !empty($form->_contactId)) {
+ CRM_Core_Error::deprecatedWarning('this is thought to be unreachable, should be passed in');
$contactId = $form->_contactId;
}
if ($fieldName) {
$fName = $fieldName;
}
+ // The optional url parameter grid is refers to Group ID.
+ // If it set the group options on the page are limited to that group
+ $groupID = is_numeric(CRM_Utils_Request::retrieve('grid', 'Integer', $form)) ? (int) CRM_Utils_Request::retrieve('grid', 'Integer', $form) : NULL;
- $groupID = $form->_grid ?? NULL;
if ($groupID && $visibility) {
$ids = [$groupID => $groupID];
}