financial#46 - clean money format at form layer
authorJon Goldberg <jon@megaphonetech.com>
Thu, 28 Feb 2019 03:24:40 +0000 (22:24 -0500)
committerJon Goldberg <jon@megaphonetech.com>
Thu, 28 Feb 2019 04:01:06 +0000 (23:01 -0500)
CRM/Contribute/Form/ContributionPage/Amount.php

index a7d4d283f7c3f2be366ba95269e677271dd21bbb..3b24f835f60d63a658395f693eee6c62f4574766 100644 (file)
@@ -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,