Re: Which HTML form builder
by Rhandom (Curate) on Jan 23, 2008 at 15:45 UTC
|
| [reply] |
|
And CSS!
Lazy man's form: With FormBuilder, I give each element a unique class and have a script that generates a basic style sheet based on FormBuilder's initial output. Then I go in emacs/TextPad and move things around as desired.
Is the style sheet sillier looking than a hand-coded-from-scratch one? Sure is. But I treasure every minute I spend not coding forms. (Hate 'em, hate 'em, hate 'em.)
| [reply] |
|
I give each element a unique class
You might be better off dropping this and using an id instead. This has a number of advantages. First, an id is supposed to represent a unique thing, whereas class is for groups. Second, in order to use label elements most effectively, you need to use a for attribute rather then nesting the control inside the label (this is due to the for approach having better support from browsers) - so you should have a unique id on each control anyway.
| [reply] |
|
|
|
| [reply] |
|
I wonder about using something like FormFu as validation ... and as the “first stab at” cranking out a template. In other words, using it for what it's good for ... capturing the output thereof ... and changing it. Then, use it just for validation in the production code.
Does that sort of thing work with FormFu? Am I sniffin' something really stinky here?
| [reply] |
Re: Which HTML form builder
by memowe (Beadle) on Jan 23, 2008 at 15:32 UTC
|
Hi roman,
you want to read this article. I use FormFu with Catalyst and DBIC. I did'nt use any other form builder and i think, i never will have to. I think, it all fits together very nice.
Regards,
Mirko
| [reply] |
|
I recently went through this myself. I read a nice HTML::Widget example (Catalyst Tutorial) that I used to jump-start the project, but I found out HTML::Widget is no longer being developed. HTML::FormFu is the replacement that seems to be undergoing rapid development.
Since FormFu was so new I tried out CGI::Formbuilder with Catalyst. I had successfully used it before with CGI::App. It has YAML configuration, easy validation both server side and javascript.
I then found a nice article on FormFu in the advent Catalyst calendar, and decided to test it out since it seems to have a lot of momentum. My simple test worked well. One thing FormFu has going for it is the ability to work with database relationship when processing data. I don't have first hand experience with that aspect, but it looks promising to put together form components from multiple related tables.
My experience with Data::FormValidator has been good. A bit of a learning curve to assembling the profile, but powerful enough to handle arbitrary validations.
In summary, if I had to choose one I'd go w/ FormFu if I were more cutting edge and CGI::Formbuilder for the more conservative.
| [reply] |
Re: Which HTML form builder
by Anonymous Monk on Jan 23, 2008 at 14:39 UTC
|
| [reply] |
Re: Which HTML form builder
by jonadab (Parson) on Jan 26, 2008 at 00:54 UTC
|
I really don't get why people want a module for this.
Maybe you can explain it to me...
See, here's my thinking:
with Perl's wealth of good quoting constructs (I tend to use
qq myself, but some people prefer heredocs, whatever),
constructing nice, clean, maintainable, wellformed,
nicely indented, human-readable HTML is... very, very easy.
Propagating the form elements with default values (taken,
if desired, from form input) is very easy. A module to
do this is, to my way of thinking, a solution in search
of a problem. Indeed, it actually makes your job harder,
because learning the XHTML needed to build forms is about
five times easier than learning the interface to a module
you've not used before, even if the module has a very
nice clean easy-to-use interface (and many don't).
Maybe you can explain your perspective to me: what is
it about constructing HTML forms that makes you say,
"Man, I wish I had a module for that"?
| [reply] |