[Catalyst] FormFu: How to ensure a field value is unique?

Carl Franks fireartist at gmail.com
Mon Jun 3 14:31:17 GMT 2013


Hi,

On 2 June 2013 12:33, Bjørn-Helge Mevik <bhx6 at mevik.net> wrote:

>             model: DB::OpusTwikiBrukernavn

> 'resultset' is not defined at /home/bhm/perl5/lib/perl5/HTML/FormFu.pm line 498.

HTML::FormFu::Model::DBIC can retrieve the DBIC schema when you set
either 'schema',
or both 'context' and 'model',
or just 'context' by calling for its default model.

resultset() must always be set - so you can't just pass the entire
resultset name to 'model'.

Try this config instead of the single 'model' above:

    model: DB
    resultset: OpusTwikiBrukernavn


> Use of uninitialized value $name in pattern match (m//) at /home/bhm/perl5/lib/perl5/HTML/FormFu/Element.pm line 71.
> Use of uninitialized value $root in hash element at /home/bhm/perl5/lib/perl5/HTML/FormFu/Role/NestedHashUtils.pm line 43.

I don't think this is also immediately linked to your error, but it
indicates that you're using a field element without a name - this is
unsupported by FormFu, and may cause other errors.

Carl



More information about the Catalyst mailing list