[html-formfu] GIving name to element of radiogroup
Carl Franks
fireartist at gmail.com
Tue Oct 30 19:17:31 GMT 2007
On 30/10/2007, kewei xiao <kewei.xiao at nald.ca> wrote:
> Hi Carl
>
> I am trying to give a name to each radio buttons in a radiogroup,
> but so far the name is still not assigned to each radio button, here is
> what I do:
>
> $self->options( [ map { {
> name => 'copyright',
> label => $_->description,
> value => $_->status_id }
> } $status->all ] );
>
> return $self;
>
> Am I doing right?
The name should be set just like all other fields:
$field->name('copyright');
options() only recognises 'value', 'label', 'group', 'attributes' and
'label_attributes' - and ignores anything else passed.
Carl
More information about the HTML-FormFu
mailing list