[html-formfu] Adding attributes to customized select box
Carl Franks
fireartist at gmail.com
Thu Jul 19 17:34:14 GMT 2007
On 19/07/07, kewei xiao <kewei.xiao at nald.ca> wrote:
> I am trying to add "style=display:none" in my customized select box,
> but I am not sure where I should put it.
>
> here is the code snippet:
>
> $self->form->element( {
> type => 'select',
> name => 'subcountry_id',
> id => 'subcountry_id',
> label_loc => "$subcountry_type:",
> options => ( [ {}, map { {
> 'label' => $_->name,
> 'value' => $_->subcountry_id }
> } $country->subcountries->all ] ) }
Add:
attrs => { style => "display:none" },
to the list of arguments to element().
Carl
More information about the HTML-FormFu
mailing list