[html-formfu] Subclassing HTML::FormFu::Element::Select

Zbigniew Lukasiak zzbbyy at gmail.com
Sat Sep 22 16:19:22 GMT 2007

Hi Carl,

I've tried to subclass HTML::FormFu::Element::Select to experiment a
bit with DBIC and FormFu integration, but I failed.  Here is what I

The script:

use HTML::FormFu;

my $form = HTML::FormFu->new;
warn $form->render;

The config:

   - type: "Select::DBIC"
     name: foo
       - [ 01, January ]
       - [ 02, February ]
       - value: 03
         label: March
           style: highlighted
       - [ 04, April ]

When I change Select::DBIC to Select this config works.

Then I have an empty Select::DBIC class:

package HTML::FormFu::Element::Select::DBIC;
use strict;

    use vars qw($VERSION );
    $VERSION     = '0.01';

use base 'HTML::FormFu::Element::Select';

After some debugging I've added two more methods:

sub render_class {
    return 'HTML::FormFu::Render::Element::field';

sub render_class_args {
    return {};

But it still fails with:
Can't locate object method "submitted" via package
"HTML::FormFu::Element::Select::DBIC" at
line 125.

What do I wrong?

Zbigniew Lukasiak

More information about the HTML-FormFu mailing list