From 88d45a96f88dc6ad6f4d572f3327ca68e16feee2 Mon Sep 17 00:00:00 2001 From: Joseph Lacey Date: Thu, 17 Mar 2016 17:24:32 -0400 Subject: [PATCH] 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 --- CRM/Contact/Form/CustomData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1