Feature #102217
openallow number with more than two digit in a field with TCA type="number"
0%
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.
Files
Updated by Chris Müller about 1 year ago
The precision is currently hardcoded to "2":
https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/backend/Classes/Form/Element/NumberElement.php#L91
Updated by Chris Müller about 1 year ago
- Related to Feature #98255: Add „float“ evaluation option for TCA type „input“ added
Updated by Garvin Hicking about 1 year ago
- Related to Feature #102237: Auto-create DB fields from TCA columns for type "number" added
Updated by Gerrit Code Review 6 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84526
Updated by Gerrit Code Review 6 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84526
Updated by Dieter Porth 2 months ago
- File Screenshot 2024-09-21 083447.png Screenshot 2024-09-21 083447.png added
- Target version set to 13.3
I have the following TCA
``
<config>
<type>number</type>
<format>decimal</format>
<size>20</size>
<range>
<lower>-90</lower>
<upper>90</upper>
</range>
<slider>
<step>0.0001</step>
</slider>
<default>47.5993</default>
</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.
Updated by Benni Mack about 1 month ago
- Target version changed from 13.3 to Candidate for Major Version