[Html-widget] table-less forms

Ash Berlin ash at cpan.org
Sat May 27 23:34:59 CEST 2006


ryan lauterbach wrote:
>
> Hi,
>
> I’m using HTML::Widget within Catalyst and I’m trying to create 
> table-less forms, where each line has a label and an input field, and 
> all the input fields are vertically aligned. For instance:
>
> $c->widget->element( 'Textfield', 'username' )->label('Username');
>
> Produces:
>
> <label for="_widget_username" 
> id="_widget_username_label">Username<input class="textfield" 
> id="_widget_username" name="username" type="text" /></label>
>
> I was wondering if there is a way to make it look like:
>
> <label for="_widget_username" id="_widget_username_label">Username</label>
>
> <input class="textfield" id="_widget_username" name="username" 
> type="text" />
>
> So css would be able to format this vertically. Or is there another 
> way to do this, some special css magic, etc?
>
> Cheers
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Html-widget mailing list
> Html-widget at lists.rawmode.org
> http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget
>   
http://oook.de/svn/trunk/HTML-Widget/t/lib/TestContainer.pm

Then:

use TestContainer;

$w->element_container_class('TestContainer');

Or to use that for all widgets do:

use HTML::Widget::Element;
HTML::Widget::Element->container_class('TestContainer')

HTH
Ash





More information about the Html-widget mailing list