[html-formfu] sample JSON formatted config file

Carl Franks fireartist at gmail.com
Fri Mar 20 08:34:05 GMT 2009


2009/3/20 Manu Kaul <manu.kaul at gmail.com>:
> Hi guys,
> I am just about to start my first FormFu form to insert an entry into the
> DB. Was going to follow
> --> http://www.catalystframework.org/calendar/2007/20 as a tutorial.
> Guys I was planning to write my configuration file in JSON format. Is there
> something special that I have to do in Catalyst to load a config file of
> format .json or would it automatically
> understand that the config file is in JSON format and use that for FormFu?

FormFu uses Config::Any - so any file type it knows about will load.
Any it doesn't, it's quite easy to write a Config::Any extension for.

Be aware some things have changed since that tutorial...

    $form->save_to_model
is now
    $form->model->update

    $form->defaults_from_model
is now
    $form->model->default_values

Carl



More information about the HTML-FormFu mailing list