2009/1/27 Jens Schwarz <[email protected]>:
> Hi,
>
> some weeks ago Carl gave me this useful hint (see below) for populating
> Select elements. Works fine with Select elements. Now I tried to adopt this
> for my ComboBox but failed (just think of the example below being a ComboBox
> instead of a Select): The result is that when I call the edit action in my
> Catalyst controller, the genre saved in the recordset is displayed in the
> genres_text part of the ComboBox - even if the genre would be available in
> genres_select.
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
_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu