[html-formfu] get_element returns undef

goetz devel at helektra.de
Wed Sep 17 11:01:52 BST 2008


Hallo,

I trie to use  get_element with no success.

The debug output is always undef.

When I use get_field or get_all_element I get the correct
output.


Any hint?


Her are the details:

in the config file:

   - type: Select
     name: name
     label: name


in my controler:

my $test = $form->get_element({ type => 'Select'});  # undef !!!!!!!
my $test01= $form->get_elements({type => 'Select'});
my $field = $form->get_field(name => 'name');
my $select= $form->get_all_element({type => 'Select'});

$c->log->debug("get_element: ".Dumper($test));
$c->log->debug("get_elements: ".Dumper($test01));
$c->log->debug("get_field: ".Dumper($field));
$c->log->debug("get_all_element: ".Dumper($select));

Terminal output:

[debug] get_element: $VAR1 = undef;
[debug] get_elements: $VAR1 = [];
[debug] get_field: $VAR1 = bless( {
                  'field_type' => 'text',
                  '_transformers' => [],
                  'label_attributes' => {},
                  '_validators' => [],
                  '_errors' => [],
		........

[debug] get_all_element: $VAR1 = bless( {
                  '_transformers' => [],
                  'label_attributes' => {},
                  '_validators' => [],
                  '_errors' => [],
                  'label_filename' => 'label',
                  'multi_value' => 1,
                  'field_filename' => 'select_tag',
                  'container_attributes' => {},
            .......




More information about the HTML-FormFu mailing list