#102217allow number with more than two digit in a field with TCA type="number"
Description
If you define in your SQL
@conversion_factor_to_g decimal(24,12) NOT NULL DEFAULT ‘0.000000000’,@
and in your TCA
@ ‘config’ => [
‘type’ => ‘number’,
‘format’ => ‘decimal’,
‘slider’ => [
‘step’ => 0.000000001,
],
]
@
you can only input numbers with at least two digits. You have no chance to input more precise numbers and the eval='double2' does not exist anymore.
The current behavior should be renamed from ‘decimals’ to ‘currency’.
The current attribute should accept a number, which defines the number of digits after the comma, you want use for storing of your number at least.
Reviews 1
Related issues 2
Files 1
History 1019
-
Chris Müller changed Related to #98255 <span data-processor="relativetime" data-value="2023-10-21T16:17:30+00:00" > 10/21/23, 16:17 </span>
-
Garvin Hicking changed Related to #102237 <span data-processor="relativetime" data-value="2023-10-25T10:53:10+00:00" > 10/25/23, 10:53 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 84526 status
NewUnder Review <span data-processor="relativetime" data-value="2024-06-07T15:15:41+00:00" > 06/07/24, 15:15 </span> -
Gerrit Code Review pushed patch set 2 for main to change 84526 <span data-processor="relativetime" data-value="2024-06-07T15:16:07+00:00" > 06/07/24, 15:16 </span>
-
Dieter Porth commented and changed attached Screenshot 2024-09-21 083447.png target version <span data-processor="relativetime" data-value="2024-09-21T06:35:50+00:00" > 09/21/24, 06:35 </span>
I have the following TCA
``
<config><br> <type>number</type><br> <format>decimal</format><br> <size>20</size><br> <range><br> <lower>-90</lower><br> <upper>90</upper><br> </range><br> <slider><br> <step>0.0001</step><br> </slider><br> <!-- see geolocation of anus (lat. in the wolrd <a href="https://www.google.com/maps/place/47%C2%B035'60.0%22N+3%C2%B031'60.0%22E/@47.5960619,3.5279667,1615m/data=!3m1!1e3!4m5!3m4!1s0x0:0xbfe98b31c7c70dcd!8m2!3d47.5999976!4d3.5333312?hl=en" target="_blank" rel="noreferrer">https://www.google.com/maps/place/47%C2%B035'60.0%22N+3%C2%B031'60.0%22E/@47.5960619,3.5279667,1615m/data=!3m1!1e3!4m5!3m4!1s0x0:0xbfe98b31c7c70dcd!8m2!3d47.5999976!4d3.5333312?hl=en</a> last visited 2022-07-30 --><br> <default>47.5993</default><br> </config>``
If I change the last digit in the default-value, I can`‘t save the data. (See Screenshot)I miss a precision parameter in the definition of the number-field.
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2024-10-15T08:19:01+00:00" > 10/15/24, 08:19 </span>
-
Florian Rival commented <span data-processor="relativetime" data-value="2025-08-13T13:54:00+00:00" > 08/13/25, 13:54 </span>
Same problem for me, I’d like to have more than 2 decimal digit.
Patch has been pushed to review server on 07/07/2024 (more than 1 year) and still not validated. -
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-08-13T18:32:47+00:00" > 08/13/25, 18:32 </span>
> Patch has been pushed to review server on 07/07/2024 (more than 1 year) and still not validated.
The patch is incomplete and has problems. Feel free to help and bring the patch to a reviewable/workable state, that would be a great help, thanks!
-
S P commented <span data-processor="relativetime" data-value="2026-04-22T07:20:15+00:00" > 04/22/26, 07:20 </span>
I’d like to add myself to the people of wishing for this feature. There are soooo many use cases where a higher precission is needed. Think of geo coordinates. Think of conversion factors. Think of physical units (a meter can not only be divided into centimeters). Actually, the use cases where “ exactly 2 decimal places” is correct are the absolute minority (making this hardcoded value of “2” even more strange, why not “1” or “3”?).
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2026-04-22T09:04:32+00:00" > 04/22/26, 09:04 </span>
I want this and I’m going to put effort to get this into v15.
-
Gerrit Code Review pushed patch set 3 for main to change 84526 <span data-processor="relativetime" data-value="2026-08-27T19:00:42+00:00" > 08/27/26, 19:00 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-01T14:37:31+00:00" > 09/01/26, 14:37 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-01T20:35:24+00:00" > 09/01/26, 20:35 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-13T04:35:52+00:00" > 09/13/26, 04:35 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-13T05:25:55+00:00" > 09/13/26, 05:25 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-13T06:25:42+00:00" > 09/13/26, 06:25 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 84526 <span data-processor="relativetime" data-value="2026-09-30T08:18:22+00:00" > 09/30/26, 08:18 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-30T10:00:12+00:00" > 09/30/26, 10:00 </span>Applied in changeset commit:14200ce6acc1eb0429c0bcb9dfbd99f2cd4ca341.
The precision is currently hardcoded to “2”:
https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/backend/Classes/Form/Element/NumberElement.php#L91