[html-formfu] combo box equivalent

Malcolm mjh-formfu at liminalflux.net
Mon Sep 15 14:22:08 BST 2008


On Monday 15 September 2008 05:56:35 Carl Franks wrote:

> The only thing I can think of, is that you're calling options()
> directly on $combobox->elements->[0]
> rather than on the combobox - don't do this - you should consider the
> combobox a blackbox with regards its child elements.

I was probably grabbing the option element instead of the combo-box. I'll test 
that out.

> If that's not it, I'll need to see some code.
>
> > work, but:
> >    elements:
> >      - type: ComboBox
> >        label: Country
> >        name: country
> >        values: USA UK Canada
> >
> > gives the somewhat confusing: "values argument (USA UK Canada) does not
> > seem to be a function" error.
>
> That is equivalent to:
>     values: 'USA UK Canada'
>
> I think you mean:
>     values: ['USA', 'UK', 'Canada']

I release that, my point was that it's error prone (at least for a newcomer 
who doesn't know the yml format well yet), and the error produced with the 
code as-is isn't very helpful, so I wasn't too keen on the API. I just hadn't 
come up with a better one yet.



More information about the HTML-FormFu mailing list