[Twisted-web] lightweight forms thing for use with athena ???

Valentino Volonghi aka Dialtone dialtone at divmod.com
Thu Dec 1 10:19:17 MST 2005


On Thu, Dec 01, 2005 at 07:47:28AM +0100, Paul Reznicek wrote:
> I'm looking for a solution to replace formless.annotate.XX with a live 
> version
> of forms, whereby among other things:
> - required fields labels are *bold* as long as they are empty or with wrong
>   content and after leaving the input field, the label change accordingly
> - value checked input's labels are *red* as long as the entered value did 
> not
>   match the allowed range of values (+ there could be a live usage hint,
>   displayed only during the input has wrong/missing value)
> - the fire (submit) button is disabled as long as the form is not complete
>   [+ maybe change the value from _('Please fill all necessary fields')
>      to _('Process') depending on form status]
> - there can be more buttons with special functions, i.ex.: date manipulation
>   (now | +/- day/month/year) for date entry fields and lot of others
> - and of course all of this usable together with i18n part of Nevow, so that
>   the messages and labels are in the user's selected language ...

I suggest hacking forms package from mg that already provides most if not all
the features you listed above.

this is the svn address: svn://pollenation.net/forms/trunk
and this is the url of the trac instance:
http://forms-project.pollenation.net/cgi-bin/trac.cgi/newticket
to add a new ticket for 'live' feature.

Currently forms looks for __nevow_form__ in the url.

I suggest something like this as API for the live form.

f = forms.Form(callback, athena=True)
...


This will make the form use a different action like: __nevow_athena_form__ to
activate a response using athena itself. The rest of the form library should
(and I'd say must) be reused.

Another, I think still missing, bit is the complete and full customization of
the form look. This is already partly available by modifying form.FormRenderer
object in particular the loader attribute but currently each widget has an
hardcoded look while there should be a parameter to activate a self provided
representation of the widget in some way (the main problem is the presence of
<br /> elements that are not styleable.

> Is there any kind of work on this target?
> - yes: I'd like to join to share and push the efforts!
> - not: Is somebody looking for the same, so it make sense to publish
>        partial results of my work?

Hope the above satisfies this question.

-- 
Valentino Volonghi aka Dialtone
Now Running MacOSX 10.4
Blog: http://vvolonghi.blogspot.com
http://weever.berlios.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20051201/861291f5/attachment.pgp


More information about the Twisted-web mailing list