[html-formfu] many-to-many with a map table and HTML::FormFu::Model::DBIC

Justin W scsys.co.uk at datademons.com
Sat Nov 21 22:01:32 GMT 2009



On Sat, 21 Nov 2009, Carl Franks wrote:

> 2009/11/20 Justin W <scsys.co.uk at datademons.com>:
>>
>> I have:
>>
>> volunteers
>> =A0-> has_many volunteer_job_types
>> =A0-> many_to_many job_types
>>
>> job_types
>> =A0-> has_many volunteer_job_types
>> =A0-> many_to_many volunteers
>
> It looks like these test files describe what you're trying to achieve:
>    t/default_values/many_to_many_select.t
>    t/default_values/many_to_many_select.yml
> so the functionality is there.
>
> Are you definitely calling $form->model->default_values( $volunteer_row )=
 ?

If I change in my form only Checkboxgroup -> Select and add multiple: 1, it
works.

Yes, I'm certainly calling default_values.

A Dumper of the field after calling ->default_values shows values =3D> [ 1,=
 2 ]
in the Checkboxgroup object, but the ->options->{ attributes } hashes are
empty.

Justin


More information about the HTML-FormFu mailing list