[TYPO3-core] RFC #16006: Feature - Remove the checkbox that clears the input fields in TCE-forms and replace it with a sprite icon

Alexander Stehlik alexander.stehlik at googlemail.com
Thu Feb 17 14:42:01 CET 2011


Hi,

I just stumbled upon this because the documentation for this new 
behaviour is missing.

In TYPO3 4.4 the checkbox did not only clear the field but there was 
also the possibility to set the value that was stored in the database if 
the field was not checked.

So for example: When I have a title field and set
checkox => 'no title'
and the checkbox is not checked "no title" will be stored in the database.

I don't really miss this feature but the documentation should be 
updated, that checkbox will only render a clear button since 4.5.

Another thing I noticed: There is a bug in this patch that makes the 
checkbox option completely obsolete:

if (isset($config['checkbox'])) {
...
}

This check is always true because if "checkbox" was not set in the 
configuration it is defaulted to an empty string or "0". The result ist, 
that the clear button is shown in all input fields no matter if checkbox 
was configured or not.

If this is the desired behaviour the checkbox configuration can be 
removed completely and also the documentation for this feature can be 
updated that this option is not available any more for 4.5.

Kind regards,
Alex



Am 15.10.2010 19:40, schrieb JoH asenau:
> Hi folks.
>
> This is a SVN patch request.
>
> Branch: trunk
>
> Type: feature
>
> BT reference: http://bugs.typo3.org/view.php?id=16006
>
> Problem:
> For input fields in TCE-forms there is an optional checkbox, that offers
> a different behaviour depending on the data type of the field. For
> ordinary input fields it clears the current value of this field on click.
>
> When used in date or datetime fields, it fills in the current time on
> click, when there is no value available yet and it clears the current
> value, when there is a date or datetime value in the field.
>
> This behaviour is inconsistent and the checkbox element is semantically
> incorrect, because there is nothing to check.
>
> Solution:
> Remove the checkbox, replace it with an icon that clears the input and
> move the date and datetime funtionality to the calendar icon.
>
> The attached patch "input_clearer" removes the checkbox and replaces it
> with a sprite icon. The icon will not show at all, unless there is a
> value in the field. On click the icon will remove the current value of
> the field. Together with this patch we need the corresponding icon to be
> placed in typo3\sysext\t3skin\images\icons\actions
>
> A second patch will take care of the removed functionality for date and
> datetime fields.
>
> Cheers
>
> Joey



More information about the TYPO3-team-core mailing list