Eval => int will create '0' as value which is wrong
I got a field which holds a duration in ms but it should be at least 1000 (ms = 1s). To check the minimum, I use the range which works fine.
If I wanna check for integer too (eval => int) and I click into the field and leave it again or if I want to delete a value, I always get the value '0'. This is a bug because after saving there will be the value 1000 saved (cause of the range checked serverside).
So if the field is empty, just do nothing and if there is a value, check it for int
(issue imported from #M5876)
You should use a checkbox like this:
This still doesn'T solve the problem because the value is optional and so 1000 as default is not an option
So, what do you want to have in the database if not 0 or 1000? How did you define field in SQL? By default it is NOT NULL DEFAULT '0'.
It is just inside of flexforms and the best thing would be just nothing stored. Of course I could make 0 as default value and catch this inside my extension but the better way would be just nothing
You set evaluation to int. In PHP empty integer values evaluate to 0...
ok, so please close this or delete it and thx for explanation
I'm closing it on request, but of course Georg is right, the behaviour is dull. The problem is that the TCA doesn't distinct between field type (eg string, integer), input value transformation (eg md5) and value validation (eg range)
Also available in: Atom