[html-formfu] Problems with HTML::FormFu::Element::Repeatable,
DateTime and Checkboxgroup
Mike Glen
mike.glen at mindsweep.net
Tue Apr 28 11:40:25 GMT 2009
I have a form where I am trying to use a Repeatable section
elements:
- type: Repeatable
name: training_class
elements:
- type: DateTime
name: start_time
label: 'Start Date / Time'
day:
prefix: "- Day -"
month:
prefix: "- Month -"
year:
prefix: "- Year -"
less: 0
plus: 2
hour:
prefix: "- Hour -"
minute:
prefix: "- Min -"
auto_inflate: 1
- type: Checkboxgroup
name: trainers
label: Trainers
and in my catalyst controller
my $repeatable = $form->get_element( name => 'training_class');
$repeatable->repeat(2);
the form displays the section twice as expected but does not display the
selects for the datetime
(if I remove the repeatable type the datetime displays properly)
also I am having trouble populating the Checkboxgroup
without the repeatable I can call
my $checkboxgroup = $form->get_element( name => 'trainers' );
$checkboxgroup->options(\@options);
to populate it
but with the repeatable section I get a "Can't call method "options" on
an undefined value " error
I have also tried using
my $checkboxgroup = $repeatable->get_element( name => 'trainers' );
$checkboxgroup->options(\@options);
but get the same error
Anyone know what I need to do?
I'm using the latest version from cpan (upgraded this morning)
Thanks
More information about the HTML-FormFu
mailing list