[Twisted-web] Freeform customisation (Was: using freeform bind_* instead of subclass TypedInterface)

Richard Wall m-lists at the-moon.net
Mon Jul 18 06:29:04 MDT 2005

On 16/07/05 20:30 Donovan Preston wrote:
> It would be really nice if it were simpler to customize formless  forms.
> Thanks for doing this example.

I think that the customisation facilities in formless are really clever.
I haven't seen another system that allows you to set out your forms so
precisely while still allowing the automatic validation and filling in
of defaults etc.

If there was a way of grouping input elements in the bind_* method and
have them rendered inside fieldsets that would be good. Perhaps you
could just add a "groupname" parameter to annotate.Type and use that

It did take me a while to get to grips with the slots etc and I think it
would be good to have more examples. Also note that the customforms
example doesn't mention the argument!!?? slot, which I find the most
useful of all.

It should also probably be mentioned that you don't *have* to define the
general argument layout. If you are happy with the default and just want
 to control the position the inputs then you only have to define
form-action and argument!!?? slots.

I have attached a patch to the customform.py example which shows usage
of the argument!!?? slot and also uses the new bind_* methods.
Or view the file at http://deadbeefbabe.org/paste/1141

I don't think that the Forms (http://forms-project.pollenation.net)
allows the same level of customisation, although there used to be
"ideas.txt" and "issues.txt" that mention "interleave mode where you get
to define lots of HTML and the forms.form weaves
itself in" and "Nested groups of fields (Structure)" respectively...
...when Forms has those capabilities it will be really useful.
Richard Wall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nevow-examples-customform.patch
Type: text/x-patch
Size: 4540 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20050718/491fcc6d/nevow-examples-customform.bin

More information about the Twisted-web mailing list