Re: [html-formfu] option attributes

2009-02-04 Thread Carl Franks
2009/2/4 Dermot : > 2009/2/4 Carl Franks : >> 2009/2/4 Dermot : >>> Hi, >>> >>> Is it possible to set the 'selected' attribute on a option element? >>> I have tried selected => 1 and selected => 'selected' but nether give >>> me the effect. >> >> Like any other field, you just need to call: >>$

Re: [html-formfu] option attributes

2009-02-04 Thread Dermot
2009/2/4 Carl Franks : > 2009/2/4 Dermot : >> Hi, >> >> Is it possible to set the 'selected' attribute on a option element? >> I have tried selected => 1 and selected => 'selected' but nether give >> me the effect. > > Like any other field, you just need to call: >$field->default( $value ) > >

Re: [html-formfu] option attributes

2009-02-04 Thread Carl Franks
2009/2/4 Dermot : > Hi, > > Is it possible to set the 'selected' attribute on a option element? > I have tried selected => 1 and selected => 'selected' but nether give > me the effect. Like any other field, you just need to call: $field->default( $value ) where $value == the selected option's

[html-formfu] option attributes

2009-02-04 Thread Dermot
Hi, Is it possible to set the 'selected' attribute on a option element? I have tried selected => 1 and selected => 'selected' but nether give me the effect. my @options; foreach (@Obj) { push(@options, {value => $_->id, label => $_->name, attributes => {selected => 'selected'} } ); } my