public $_contactId;
/**
- * form defaults
+ * Form defaults
*
* @var array
*/
protected $_defaults = array();
/**
- * build all the data structures needed to build the form
+ * Build all the data structures needed to build the form
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
$params['contact_type'] = $this->_contactType;
+ //CRM-14904
+ if ( isset($this->_defaults['contact_sub_type']) ) {
+ $params['contact_sub_type'] = $this->_defaults['contact_sub_type'];
+ }
$params['contact_id'] = $this->_contactId;
$contact = CRM_Contact_BAO_Contact::create($params, TRUE);