[Typo3-dev] thoughts on the FE lib

Martin Kutschker martin.t.kutschker at blackbox.net
Sun Nov 2 20:31:54 CET 2003


Hi Danie!

> I assume that the context of this mail is the discussion on how to deal
> with FE-edit functionality.

Yes. I had the impressions that some guys (you?) are working on something new, so I wanted to share my invaluable insights ;-)

> > - Don't make the lib rely on Javascript or any other client technology
> > for form preview/submission.
> 
> A good solution must include both.

Nothing's wron with JS and eg form validation. I was referring to the fact that FE-lib uses JS to *pass*on* data (it uses empty  HTML forms and an "update" script code).

> > - Have "display values" for "text fields" and "bitmask arrays", eg
> > internal values 0/1 are displayed as male/female or value 5 is
> > displayed as "yellow,blue" given that bit 0="yellow" and bit 2="blue".
> > *)
> 
> I do not get the point.

Example: a field stores the sex of a user, 1 means male, 2 female and 0 no value given or not applicable (eg for organizations). In the current FE lib ###FIELD_sex### would display the numeric value (given that the user got a select box with these values). But for preview I want of course a (localized) string value. So I introduced something like this: ###SHOWFIELD_sex###, which will display for this example "male", "female" or "".

Do you get the idea now?

> > - Allow upload fields to be previewed and changed **)
> 
> The first step would be solution to make upload fields editiable again.

Not so hard. Just have an additional  temp. field for every upload field. Just make sure that any stale temp. files get deleted  and the right one stored in its final location.

It probably gets tricky when the upload field may contain multiple files.

> would you share the code you have written? I am currently working on a
> overall solution.

Sure, that's why I have mentoined it. I'll send you or anyone interested the file in private mail. I'll post the rather small changes for the SHOWFIELDS on the list.

Masi






More information about the TYPO3-dev mailing list