<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
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
*
- * @return None
+ * @return void
*/
function setDefaultValues() {
return $this->_defaults;
}
/**
- * Function to actually build the form
+ * Build the form object
*
- * @return None
+ * @return void
* @access public
*/
public function buildQuickForm() {
*
* @access public
*
- * @return None
+ * @return void
*/
public function postProcess() {
// store the submitted values in an array
}
$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);