From 43862c49f30e0428d6c02fa5bd63cb2dea34fce1 Mon Sep 17 00:00:00 2001 From: Maxime Doutreluingne Date: Sat, 30 Dec 2023 16:21:22 +0100 Subject: [PATCH] [Form] Add `model_type` option to `MoneyType` --- reference/forms/types/money.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index 9f98b49158b..65f24ac93a3 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -76,6 +76,18 @@ If set to ``true``, the HTML input will be rendered as a native HTML5 As HTML5 number format is normalized, it is incompatible with ``grouping`` option. +model_type +~~~~~~~~~~ + +**type**: ``string`` **default**: ``float`` + +If, for some reason, you need the value to be converted to an ``integer`` instead of a ``float``, +you can set the option value to ``integer``. + +.. versionadded:: 7.1 + + The ``model_type`` option was introduced in Symfony 7.1. + scale ~~~~~