CRM_Core_BAO_UFGroup::buildProfile($this, $field, $this->_mode);
+ if ($field['add_to_group_id']) {
+ $addToGroupId = $field['add_to_group_id'];
+ }
+
//build array for captcha
if ($field['add_captcha']) {
$addCaptcha[$field['group_id']] = $field['add_captcha'];
}
$this->assign("isCaptcha", $this->_isAddCaptcha);
+ if ($this->_mode != self::MODE_SEARCH) {
+ if (isset($addToGroupId)) {
+ $this->_ufGroup['add_to_group_id'] = $addToGroupId;
+ }
+ }
+
// lets do the defaults, so we can use it for the below state country routines
$this->setDefaultsValues();