John Napiorkowski wrote:
Hi,

In some of the Formbuilder documentation for the
configuration file I get the impression that a
subroutine or subref can be called.  I get this from
looking at the documentation for:
"http://search.cpan.org/~nwiger/CGI-FormBuilder-3.0401/lib/CGI/FormBuilder/Source/File.pm";

There is an example configuration file and the
following lines:

# custom options and sorting sub
state:
  options:  \&getstates
  sortopts: \&sortstates

Has anyone been able to make this work?  Or was this
example just a work in progress?

The problem is these are called in the wrong caller() from w/i Catalyst. These work outside Catalyst. I don't believe there's a patch/fix currently, but you can use them within your Catalyst controller by calling $c->form:

   sub something : Form {
       # ...
       $c->form->field(name => 'states',
                       options => \&get_states,
                       validate => \&check_states);
   }

If you have a fix, I'll gladly apply it.

-Nate (FB Author)


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to