2009/1/29 Jens Schwarz <blacky6...@gmx.de>:
> Hi Carl,
>
>> Hi Jens,
>>
>> Say the select part of a ComboBox has the following options:
>> [ 1 => 'One',
>>   2 => 'Two',
>>   3 => 'Three',
>> ]
>> To have the ComboBox select the correct item, you need to do, for example:
>>     $combobox->default( 2 );
>> and not
>>     $combobox->default( 'Two' );
>>
>> Could that be the problem?
>> I can't tell from your description, whether you're using Model::DBIC's
>> default_values(), or whether you're setting it yourself - so can't
>> really advise further how to fix it.
>>
>> Carl
>
> sorry for the delay. Yes, I use default_values() from Model::DBIC and your 
> hint unfortunately did not solve my problem.

Well, my blind guess didn't work, so without some form + dbic config,
I don't have much more to go on.

I've updated the files
    t/default_values/belongs_to_lookup_table_combobox.t
    t/default_values/belongs_to_lookup_table_combobox.yml
to ensure a ComboBox works as expected, being populated with
options_from_model(), and then selecting the correct menu option with
default_values(). (svn r1304)

Carl

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

Reply via email to