[html-formfu] Problem loading file

Carl Franks fireartist at gmail.com
Thu Jul 5 15:32:28 GMT 2007


On 05/07/07, Cosmin Budrica <cosmin at sns.ro> wrote:
> Hello,
>
> I have just installed HTML::FormFu, and I am trying to work with it.
> I got the example from the doc's Synopsis, but i get an error:
> file error - form: not found
>
> perl -MYAML::Syck -MData::Dumper -e 'my $data =
> YAML::Syck::LoadFile("form.yml"); print Dumper $data'
> looks ok, no errors.

By default, formfu expects to find it's template files in a folder
called 'root' within the current directory

To change where to look for the files, set:
    $form->render_class_args({ INCLUDE_PATH => $path });

Or within your yaml file like this:

---
render_class_args:
    INCLUDE_PATH: '/my/path'

To create the template files in the first place, run this 1-liner:

perl -MHTML::FormFu::Deploy -e 'deploy()'

To create the files in a directory other than 'root', pass the name as
an argument to deploy()
Any time you upgrade formfu, you'll need to run deploy() again, and
update your templates.

Carl



More information about the HTML-FormFu mailing list