- for ($i = 0; $i <= $_POST['hidden_custom_group_count'][$this->_groupID]; $i++) {
- CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_contactSubType, $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);