diff --git a/Civi/FormProcessor/Type/GenericType.php b/Civi/FormProcessor/Type/GenericType.php index 0429b3df0a99b736ba239e4d3acb4ba367ebdda1..485310d6d129e5bc710b11847c8449659464104f 100644 --- a/Civi/FormProcessor/Type/GenericType.php +++ b/Civi/FormProcessor/Type/GenericType.php @@ -46,6 +46,23 @@ } return false; } + + /** + * Denormalize the input value. + * + * @param $value + * + * @return mixed + */ + public function denormalizeValue($value) { + switch ($this->getCrmType()) { + case \CRM_Utils_Type::T_FLOAT: + case \CRM_Utils_Type::T_MONEY: + return (float) $value; + break; + } + return $value; + } }