From: Joseph Lacey Date: Thu, 17 Mar 2016 21:24:32 +0000 (-0400) Subject: CRM-18188 Fixing duplicate rules on required fields when creating tabbed contact... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=88d45a96f88dc6ad6f4d572f3327ca68e16feee2;p=civicrm-core.git CRM-18188 Fixing duplicate rules on required fields when creating tabbed contact custom data. ---------------------------------------- * CRM-18188: Tabbed Custom Data Required Field Submit Values Ignored https://issues.civicrm.org/jira/browse/CRM-18188 --- diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php index c8bc7bfd48..0b9f81555c 100644 --- a/CRM/Contact/Form/CustomData.php +++ b/CRM/Contact/Form/CustomData.php @@ -155,7 +155,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { - for ($i = 0; $i <= $_POST['hidden_custom_group_count'][$this->_groupID]; $i++) { + for ($i = 1; $i <= $_POST['hidden_custom_group_count'][$this->_groupID]; $i++) { CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_contactSubType, $i, $this->_contactType, $this->_tableID); CRM_Custom_Form_CustomData::buildQuickForm($this); CRM_Custom_Form_CustomData::setDefaultValues($this);