[Html-widget] newbie question: <br>

Carl Franks fireartist at gmail.com
Fri Feb 9 16:03:38 GMT 2007


On 09/02/07, Will Smith <willbelair at yahoo.com> wrote:
> Thank you for your reply.
>  In fact, I have to do that in controller due to some other functionality.
> So my simple code is:
>
>  my $w =
> $c->widget('feedback')->method('post')->action($c->req->uri);
>      for(looping to create multiple rows)
>     {
>       $w->element('Textfield', 'name')->size(15);
>       $w->element('Textfield', 'email')->size(15);
>       $w->element('Textfield', 'comment')->size(30);
>     }
>       $w->element('Submit', 'send')->value('Send it');
>
>  and the result I want is a set of number of rows of 3 text fields, no
> labels, and a submit button on the last, seperate line.

okay, I would suggest changing the loop body, so for each iteration
you create either a Block or a Fieldset element, and add the
textfields to that instead of the widget.
for (... {
  my $div = $w->element('Block');
  $div->element('Textfield', ...);
  ...
}
Then you should just need to do
input {float: left}

If you're still having trouble, I recommend using firefox's DOM
inspector, as that lets you change the css, and displays the results
'live'.

Carl



More information about the Html-widget mailing list