[jifty-devel] Form fields and output
Gaal Yahas
gaal at forum2.org
Sat Nov 25 01:56:28 EST 2006
A form field object stringifies to "" but triggers writing its HTML to
the web output. Has it been considered to just return the HTML? Usage
can remain the same:
<% Jifty->web->form_field('foo') %>
%# or:
% $foo = Jifty->web->form_field('foo');
% $foo->this;
% $foo->that;
<% $foo %>
However, now the programmer can hack the generated HTML to make it
fit a template made by a designer better. I realize that *not* having
access to the HTML may sound like a good place to enforce cleanliness,
but this limitation drove me to write clientside JavaScript hackery when
I needed to lay out a set of radio buttons in a certain way.
Is there a clean alternative? I suppose I could have subclassed the
form field widget and override the stringification method, but I was
wondering if just changing the behavior everywhere would break anything.
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the jifty-devel
mailing list