Skip to content
Snippets Groups Projects
Commit a7a89b51 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #1196 from yashodha/4.3.CRM-13046

CRM-13046
parents 69bda506 5a547074
No related branches found
No related tags found
No related merge requests found
......@@ -131,14 +131,23 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form {
function setDefaultValues() {
$defaults = $this->_values;
$ufJoinParams = array(
$ufContactJoinParams = array(
'entity_table' => 'civicrm_survey',
'entity_id' => $this->_surveyId,
'weight' => 2,
);
if ($ufGroupId = CRM_Core_BAO_UFJoin::findUFGroupId($ufJoinParams)) {
$defaults['contact_profile_id'] = $ufGroupId;
if ($ufContactGroupId = CRM_Core_BAO_UFJoin::findUFGroupId($ufContactJoinParams)) {
$defaults['contact_profile_id'] = $ufContactGroupId;
}
$ufActivityJoinParams = array(
'entity_table' => 'civicrm_survey',
'entity_id' => $this->_surveyId,
'weight' => 1,
);
if ($ufActivityGroupId = CRM_Core_BAO_UFJoin::findUFGroupId($ufActivityJoinParams)) {
$defaults['profile_id'] = $ufActivityGroupId;
}
if (!isset($defaults['is_active'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment