[Html-widget] formfu contributions?

Carl Franks fireartist at gmail.com
Fri Mar 16 13:17:29 GMT 2007


On 16/03/07, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
> On 3/15/07, Mario Minati <mario.minati at googlemail.com> wrote:
> > For me that is nothing that should be part of FormFu (as it's concentrated on
> > Forms) but maybe of LayoutFu (which could connect closely to FormFu).
>
> The most common complaint about HTML::Widget was that it breaks the
> division between the Controller and the View - by realizing layout in
> the Controller.  We have the various templating languages that work
> for layout quite well and I don't think we need another one.  But we
> do need some sane way of delegating the layout functions from FormFu
> to the templating system. This was discussed quite extensively here -
> but still I don't see any adequate answer to this issue. What I would
> propose is a two way approach - first you should be able to start with
> just using [% form %] in the template for the page and [% form.css %]
> in the template for CSS and get some sane layout. Then there should be
> a way to gradually move parts of what [% form %] generates into the
> template - so that if you are not happy with the generated HTML you
> can replace it gradually chunk by chunk.

okay, but I don't this is what John was refering to with
    "more general system for creating blocks and page regions"

Regarding what you describe - you need to come up with a suggested
API, because I don't know what you mean by "replace it gradually chunk
by chunk".
What do you actually want to be able to do?

There are currently several ways you can work.
#1
[% form %]

#2
To allow a designer to rearrange fields or change attributes, define
the form fields in a config file, and let them edit that.
If you want to make it as simple as possible for them, have a seperate
config file for just the fields, and use a different config file they
don't have access to for form options, field constraints, etc.

#3
To edit the XHTML - each project has its own copy of the 'root'
directory containing the TT templates - edit them, that's what they're
there for.

#4
Render each section chunk-by-chunk with the likes of
[% f.start_form %]
[% f.hidden_fields %]
[% f.end_form %]
[% f.field('foo') %]
etc

What else could you want? ;)
Carl



More information about the Html-widget mailing list