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




_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to