Issue Feature Resolved

#102217allow number with more than two digit in a field with TCA type="number"

Dieter Porth 10/21/23, 10:29 updated 09/30/26, 10:00

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

Files 1

History 1019

  1. 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&#039;60.0%22N+3%C2%B031&#039;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.

  2. 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.

  3. 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!

  4. 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”?).

  5. 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.

  6. Georg Ringer commented and changed status Under Review Resolved done 0 % 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.