[TYPO3-core] RFC: readonly field rendering
René Fritz
rene at typo3.org
Wed Feb 15 12:07:36 CET 2006
committed
René
> This is a CVS patch request
>
> Type: feature
>
> Branch: TYPO3_4-0
>
>
> This adds the possiblity to set TCEForm items to read-only. The fields
> should display the data like the editable variants (date rendered as date -
> not as integer).
> You can imagine that "readonly" might be set at runtime without the need to
> change the type of the field.
> It is implemented by setting form elements disabled="disabled" which works
> in Mozilla, IE, Konqueror. Some fields were just renered as type="none".
> And sometimes parts are simply not rendered (eg. element browser link).
> Hidden form fields for submitting form values are not rendered.
>
> The solution <input disabled="disabled" is not totally safe but hey, I can
> manipulate POST data anyway when I really want ...
>
>
> Example:
>
> "starttime" => Array (
> "exclude" => 1,
> "label" => "LLL:EXT:lang/locallang_general.php:LGL.starttime",
> "config" => Array (
> "type" => "input",
> "readonly" => 1, #####
> "size" => "8",
> "max" => "20",
> "eval" => "date",
> "default" => "0",
> "checkbox" => "0"
> )
> ),
>
>
> Attached is
> - patch
> - screenshot of readonly rendering
> - test extension (append &readonly=1 to alt_doc.php url to set the fields
> to readonly)
>
>
>
> Documentation:
> http://typo3.org/documentation/document-library/doc_core_api/columns_fieldn
>am-1/
>
> Key
> readonly
>
> Datatype
> boolean
>
> Description
> If set the form field will be rendered in a way that the user can see the
> values but can't edit them. The rendering is similar to the editable
> variants but not neccesarily the same and might differ in layout and size.
>
> Scope
> Display
>
>
>
> René
--
René Fritz
TYPO3 Association - Active Member
http://association.typo3.org/
More information about the TYPO3-team-core
mailing list