Project

General

Profile

Actions

Bug #96654

closed

Problem when using maxLength with input type number in TCA or FlexForm

Added by taieb rekik over 2 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2022-01-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

In typo3 by default the eval 'int, num' will return an input with type number, I found a problem that does not respect the 'max' attribute, since are it works correctly good with the input type text, as I check the problem exists in HTML, and in some case solved by type 'tel', I will suggest if are possible to add as 'eval' or we check another solution for this problem in TCA and FlexForm.

Test Case:
You need to create an input in the Flexform file with eval 'int' or 'num' and give it a 'max' value, you will find how it will give the way to type even length is more than the maxLength.



Files

number_error_1.png (15.3 KB) number_error_1.png taieb rekik, 2022-01-26 16:50
error_number_2.png (6.05 KB) error_number_2.png taieb rekik, 2022-01-26 16:50
Actions #1

Updated by taieb rekik over 2 years ago

  • Category changed from Backend User Interface to FormEngine aka TCEforms
Actions #2

Updated by Andreas Kienast about 2 years ago

  • Status changed from New to Needs Feedback

Hello Taleb,

albeit TCA allows this configuration, this has no effect. The thing is, FormEngine renders <input type="number" ... maxlength="20"> which seems to be ignored by browsers.
Can you please check whether the following configuration works for you?

<range>
    <lower>-99999999999</lower>
    <upper>99999999999</upper>
</range>

max will be very likely ignored completely in v12 as we're refactoring crucial parts of TCA.

Actions #3

Updated by taieb rekik about 2 years ago

Thank you so much for the insturuction, i see also that the new type with the typo3 v12 will resolve this type of issue

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97193-NewTCATypeNumber.html

Actions #4

Updated by Christian Kuhn 7 months ago

  • Status changed from Needs Feedback to Closed

As far as I understood, this has been resolved in v12 with the introduction of type=number. I hope it's ok to close here, feel free to pick this up again in case we missed something.

Actions

Also available in: Atom PDF