Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.1
-
Fix Version/s: Unscheduled
-
Component/s: CiviContribute
-
Labels:None
Description
Contribution forms with separate membership payment do not handle the case in which recurring amount is selected and nothing is entered in in the additional amount field.
Recreate:
1. Create a contribution form with memberships enabled, and optional additional contribution amounts with separate payments.
2. Complete a form with a membership selected, and one-time additional amount selected, but additional amount left blank. Observe that the confirmation screen and billing ignore the non-entered contribution.
3. Complete a form again, with membership selected, and a recurring additional amount radio button selected, but additional amount left blank. Observe that billing form incorrectly shows text indicating that a recurring billing will be performed, but with missing values.
Desired behaviour:
add a validation rule forcing other amount to be non-empty if is_recur is selected.
Example fix:
CRM/Contribute/Form/Contribution/Main.php, near line 584
if ( isset( $fields['is_recur'] ) && $fields['is_recur'] ) {
if ( $fields['frequency_interval'] <= 0 )
if ( $fields['frequency_unit'] == '0' )
{ $errors['frequency_unit'] = ts('Please select a period (e.g. months, years ...) for how often you want to make this recurring contribution (EXAMPLE: Every 3 MONTHS).'); }+ if ( $fields['amount_other'] == '' )
{ + $errors['amount_other'] = ts('Please enter an amount for your recurring contribution, or unselect the recurring option.'); + }}
NOTE: this is just a partial fix, since there is also an issue, that user's can't really 'unselect' recurring, they have to select one-time which is non-obvious