[TYPO3-core] RFC: readonly field rendering
Martin Kutschker
Martin.Kutschker at blackbox.net
Thu Feb 9 20:42:15 CET 2006
René Fritz <rene at typo3.org> writes on
Thu, 09 Feb 2006 19:49:20 +0100 (MET):
>
>
> > =?utf-8?q?Ren=C3=A9_Fritz?= <rene at typo3.org> writes on
> >
> > Thu, 09 Feb 2006 16:45:29 +0100 (MET):
> > > You can imagine that "readonly" might be set at runtime without
> > > the need to change the type of the field.
> >
> > Temporarily disabling a form field with HTML attributes is fine. But
> > if
> > it's only temporary then IMHO the TCA is not the right place for
> > it.
>
> It don't have to be usable for temporary usage only.
>
> > I'd like to see type "none" to support more output formats instead.
>
> The point is that "none" will never know about all field types and the
> data behind it. For example the values for a select field has to be
> fetched, processed, TSConfig, etc. Also think about user fields.
User fields can either use type="user" directly or provide a user function for type="none".
> In my opinion all field types should be able to render themselves as
> read-only.
I don't think that this is useful for all fields. And much code is aczually about presenting options (select boxes, radio buttons, etc) and other UI elements (eg wizards).
What type "none" is missing are DB relations (input: select boxes), value-based labels (input: select boxes and radio buttons) and bitmask-based labels (input: check boxes).
Anyway, following your idea, I suggest that the TCA flag is just one trigger for the rendering function to go into read-only mode.
Masi
More information about the TYPO3-team-core
mailing list