[html-formfu] How to have a null row in a select box?
Kaare Rasmussen
kaare at jasonic.dk
Wed Mar 11 15:46:00 GMT 2009
> > In the config yml file I have this
> >
> > - type: Select
> > name: parent_id
> > label: Parent
> > model_config:
> > resultset: Parents
> > id_column: id
> > label_column: label
> >
> > This is OK if we need an entry. But what if this should result in a null
> > calue in the database, or an undef in Perl?
>
> Are you meaning a NULL value for the id_column or label_column,
> or the resultset returning zero rows?
If the Parents table has
id label
1 Mom
2 Dad
I'd lke the select group to have three options,
undef <none>
1 Mom
2 Dad
And be able to tell what the label of <none> should be. Is that possible?
--
Med venlig hilsen
Kaare Rasmussen, Jasonic
Jasonic Telefon: +45 3816 2582
Nordre Fasanvej 12
2000 Frederiksberg Email: kaare at jasonic.dk
More information about the HTML-FormFu
mailing list