CRM-18188 Fixing duplicate rules on required fields when creating tabbed contact...
authorJoseph Lacey <joseph@palantetech.coop>
Thu, 17 Mar 2016 21:24:32 +0000 (17:24 -0400)
committerJoseph Lacey <joseph@palantetech.coop>
Thu, 17 Mar 2016 21:24:32 +0000 (17:24 -0400)
----------------------------------------
* CRM-18188: Tabbed Custom Data Required Field Submit Values Ignored
  https://issues.civicrm.org/jira/browse/CRM-18188

CRM/Contact/Form/CustomData.php

index c8bc7bfd48744ee38b83526906716f35abac883e..0b9f81555cc02abbdd5a13190416435e43faad1c 100644 (file)
@@ -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);