Hi guys

I am trying to wrap input box inside <label>...</label> for my customized checkboxgroup, like this:

  <label>
      <input....../>
  </label>

  right now my code separate them, like this:

  <input.../>
  <label></label>

  here is what I do:

   use base qw( HTML::FormFu::Element::Checkboxgroup );

sub setup {
   my $self = shift;

   $self->type( 'checkboxgroup'  );
   $self->container_tag( 'div' );

   my $c        = $self->form->stash->{ context };
   my $keywords = $c->model( 'Activities::Keyword' )
       ->search( undef, { order_by => 'name' } );

   $self->name( 'keywords' );

   $self->options(
       [   map {
               {
                   label   => $_->name,
                   value   => $_->keyword_id,
                   attributes => { id => 'keyword_' . $_->keyword_id }
               }
               } $keywords->all
       ]
   );

   return $self->next::method( @_ );
}

Any suggestions?  Thanks in advance

Kewei


_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to