[html-formfu] load_config_file in the middle of YAML

Mario Minati mario.minati at googlemail.com
Thu Oct 11 09:27:53 GMT 2007


On Wednesday 10 October 2007 13:02:17 Ruben Fonseca wrote:
> Hi!
>
> I'm trying to use the load_config_file in the middle of a YAML
> specification to load some common form widgets from another file, but
> so far I've been unsuccessful.
>
> Imagine this YAML:
> ---
> action: /foo
>
> elements:
> 	- type: Text
>            ...
>
>          - load_config_file: /foo/file
>
>          - type: Submit
>            ...
>
>
> And on /foo/file I have:
> ---
> elements:
> 	- type: Text
>            ...
>
>
> This generates an error "an't locate object method "elements" via
> package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/
> site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain I
> did something wrong.
>
> Can you tell me the proper way to do this please?

load_config_file works from everywhere.

You problem is that type Text has no elements.

If you would use e. g. type Fieldset than it would work.

Greets,

Mario Minati



More information about the HTML-FormFu mailing list