hello,

I’m using HTML::FormFu to generate forms for a small Dancer2 application. 
Creating the forms all works fine. While trying to experiment with 
HTML::FormFu::Model::DBIC I got lost.

With the code shown below the form is generated but the select element doesn’t 
show any values. Have I missed something?

Best regards,
Gert


The route in the Dancer2 App is:

————
get '/add-client' => sub {
   my $form = HTML::FormFu->new;
   $form->model('DBIC');
   $form->stash( schema => $schema );
   my $data = LoadFile('forms/addcountry.yml');
   $form->populate($data);
   template 'add-country' => { 'myform' => $form };
};
————

The addcountry.yml part where the element shows up is:

————
  - type: Block
     tag: tr
     attributes:
       id: country_id
     elements:
     - type: Block
       tag: td
       content_xml: "Land-code *"
       attributes:
         class: label
     - type: Block
       tag: td
       elements:
         type: Select
         name: "country_id"
         model_config:
           resultset: Country
————




_______________________________________________
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