CRM_Core_BAO_CustomGroup::setDefaults($groupTree, $this->_defaults);
$this->setDefaults($this->_defaults);
- CRM_Core_BAO_CustomGroup::buildQuickForm($this, $groupTree, FALSE, 1);
+ CRM_Core_BAO_CustomGroup::buildQuickForm($this, $groupTree);
//need to assign custom data type and subtype to the template
$this->assign('entityID', $this->_entityID);
// we setting the prefix to 'dnc_' below, so that we don't overwrite smarty's grouptree var.
// And we can't set it to 'address_' because we want to set it in a slightly different format.
- CRM_Core_BAO_CustomGroup::buildQuickForm($form, $groupTree, FALSE, 1, 'dnc_');
+ CRM_Core_BAO_CustomGroup::buildQuickForm($form, $groupTree, FALSE, 'dnc_');
$template = CRM_Core_Smarty::singleton();
$tplGroupTree = $template->get_template_vars('address_groupTree');
/**
* generic function to build all the form elements for a specific group tree
*
- * @param CRM_Core_Form $form the form object
- * @param array $groupTree the group tree object
- * @param string $showName
- * @param string $hideName
+ * @param object $form the form object
+ * @param array $groupTree the group tree object
+ * @param boolean $inactiveNeeded return inactive custom groups
+ * @param string $prefix prefix for custom grouptree assigned to template
*
* @return void
* @access public
* @static
*/
- static function buildQuickForm(&$form,
- &$groupTree,
- $inactiveNeeded = FALSE,
- $groupCount = 1,
- $prefix = ''
- ) {
-
+ static function buildQuickForm(&$form, &$groupTree, $inactiveNeeded = FALSE, $prefix = '' ) {
$form->assign_by_ref("{$prefix}groupTree", $groupTree);
- $sBlocks = array();
- $hBlocks = array();
// this is fix for date field
$form->assign('currentYear', date('Y'));
foreach ($groupTree as $id => $group) {
-
CRM_Core_ShowHideBlocks::links($form, $group['title'], '', '');
-
- $groupId = CRM_Utils_Array::value('id', $group);
foreach ($group['fields'] as $field) {
$required = CRM_Utils_Array::value('is_required', $field);
//fix for CRM-1620
static function buildQuickForm(&$form) {
$form->addElement('hidden', 'hidden_custom', 1);
$form->addElement('hidden', "hidden_custom_group_count[{$form->_groupID}]", $form->_groupCount);
- CRM_Core_BAO_CustomGroup::buildQuickForm($form, $form->_groupTree, FALSE, $form->_groupCount);
+ CRM_Core_BAO_CustomGroup::buildQuickForm($form, $form->_groupTree);
}
}
);
// simplified formatted groupTree
$groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, 1, $form);
- CRM_Core_BAO_CustomGroup::buildQuickForm($form, $groupTree, FALSE, 1, 'event_survey_');
+ CRM_Core_BAO_CustomGroup::buildQuickForm($form, $groupTree, FALSE, 'event_survey_');
if (isset($groupTree) && is_array($groupTree)) {
$participantId = CRM_Utils_Request::retrieve('pid', 'Positive', $form, TRUE, 0, 'REQUEST');