Hi,

Am 18.08.2009 um 19:59 schrieb Ascii King:

Is it opossible to display multiple columns in a Select element? I have looked and can't find it in the documentation.

The YAML definition of a form only allows the specification of a single column name.

However, you could add an accessor into one of your Result classes to get the text you like to expect as a label for the Select element. To avoid lots of trivial selects you should add a 'prefetch' attribute into the model config like the example below if the columns involved sit in different tables.

<snip>
# in my Result::Info I concatenate the name of a foreign table 'infokind' with name
sub description {
    $_[0]->infokind->name . ' / ' . $_[0]->name;
}

# in my form.yml I can simply use it...
- type: Select
  ...
  model_config:
    resultset: Info
    label_column: description
    attributes:
      prefetch: infokind
...
<snap>


Regards,

Wolfgang Kinkeldei

--

' /\_/\ ' .print[split??,"".(($/=q|Cms)+-03467:;<=|)=~tr!C-z -B! -z!)x
'( o.o )' .$/]->[hex]foreach split qr<>,qq+1ecd039ad65b025b8063475b+||
' > ^ < ' .q<!-- Wolfgang Kinkeldei - mailto:wolfg...@kinkeldei.de -->





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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