From 138bec7c4e4e0592d59d6f484edeee9c033971fd Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Wed, 27 Feb 2019 22:24:40 -0500 Subject: [PATCH] financial#46 - clean money format at form layer --- CRM/Contribute/Form/ContributionPage/Amount.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/ContributionPage/Amount.php b/CRM/Contribute/Form/ContributionPage/Amount.php index a7d4d283f7..3b24f835f6 100644 --- a/CRM/Contribute/Form/ContributionPage/Amount.php +++ b/CRM/Contribute/Form/ContributionPage/Amount.php @@ -589,9 +589,10 @@ class CRM_Contribute_Form_ContributionPage_Amount extends CRM_Contribute_Form_Co if (isset($values[$i]) && (strlen(trim($values[$i])) > 0) ) { + $values[$i] = $params['value'][$i] = CRM_Utils_Rule::cleanMoney(trim($values[$i])); $options[] = array( 'label' => trim($labels[$i]), - 'value' => CRM_Utils_Rule::cleanMoney(trim($values[$i])), + 'value' => $values[$i], 'weight' => $i, 'is_active' => 1, 'is_default' => $default == $i, -- 2.25.1