[Html-widget] HTML-FormFu example xhtml

Xavier Robin robin0 at etu.unige.ch
Tue Jan 30 17:02:29 GMT 2007

On Friday 19 January 2007 18:41, Carl Franks wrote:
> I've mentioned a couple of times recently that I've been working on a
> replacement for H-W.
> It's codename is HTML::FormFu, and I've decided to post an example of
> the markup it currently generates, including example css, in case
> anyone's interested in giving feedback.

Well, even if I am a bit late, I think it looks pretty nice.
I think it is a really sensible evolution for HTML::Widget, even if I'm not 
sure to see the point of having this under another name... wouldn't it be 
backward-compatible with HTML::Widget?

I like the "add_container_attrs()" and "content()", as I was somewhat 
frustrated not to be able to add markup in select options (I hope it is what 
content is really intended for...).
The "comment()" is nice also, but it would be even better if it allowed HTML 
(but perhaps it does?) and if one could define comments that may go above the 
field (perhaps it does also?).

About the select outgroups, it's a nice idea.
Concerning the syntax :
{ group => [ [ 1 => 'one' ], [ 2 => 'two' ] ], label => 'opt1' },
I don't see the point of the double level arrayref here. Why not just:
{ group => { 1 => 'one', 2 => 'two'}, label => 'opt1' },
? I think it would be more readable than this double arrayref. But perhaps it 
has got a good reason to be so which I do not know.

For the Image element, an "alt()" would be useful to set an alternate text I 
think (by the way, is it possible to mix Image and Submit?)

Concerning the HTML rendering, the radio buttons seems to miss a <label> that 
would allow to click on the text rather than on the button itself.
Apart of that, why do the ids always be different from names? Is there a 
reason for that?
Last comment for rendering, when you disable the CSS stylesheets, all the 
fields are lined one after another in a cabbalistic manner that make it 
nearly impossible to understand for a normally-constituted human. This may be 
an issue for disabled people or those using older browsers. I think it would 
be worth putting each field in a <p> or something like that.

Finally, I wonder if we will be able to access every element and its content 
individually, for example using [% result.element('t1').label %] or 
[% FOREACH radio in result.rg3; radio.field; END %] for example? That would be 
really useful for people who, like me, want to have a complete control on the 
output, far beyond what can be allowed by any widget module. ;-)

Well, that makes quite a lot of comments, I hope they will be useful !

Thanks for all the work

Some people says that if you play a Windows XP install CD backwards you will 
hear demon voices commanding you to worship Satan. But that's nothing. If you 
play it forward it will install Windows XP.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/html-widget/attachments/20070130/d251d71a/attachment.pgp

More information about the Html-widget mailing list