public static function recurringContribution(&$form) {
// Recurring contribution fields
foreach (self::getRecurringFields() as $key => $label) {
- if ($key == 'contribution_recur_payment_made' &&
+ if ($key == 'contribution_recur_payment_made' && !empty($form->_formValues) &&
!CRM_Utils_System::isNull(CRM_Utils_Array::value($key, $form->_formValues))
) {
$form->assign('contribution_recur_pane_open', TRUE);
}
CRM_Core_Form_Date::buildDateRange($form, $key, 1, '_low', '_high');
// If data has been entered for a recurring field, tell the tpl layer to open the pane
- if (!empty($form->_formValues[$key . '_relative']) || !empty($form->_formValues[$key . '_low']) || !empty($form->_formValues[$key . '_high'])) {
+ if (!empty($form->_formValues) && !empty($form->_formValues[$key . '_relative']) || !empty($form->_formValues[$key . '_low']) || !empty($form->_formValues[$key . '_high'])) {
$form->assign('contribution_recur_pane_open', TRUE);
break;
}