use strict; use warnings; use Test::More; use HTML::FormHandler::Test; { package MyApp::Form::Test; use HTML::FormHandler::Moose; extends 'HTML::FormHandler'; has '+widget_wrapper' => ( default => 'Bootstrap3'); sub build_form_tags {{ 'layout_classes' => { label_class => ['col-lg-2'], element_wrapper_class => ['col-lg-10'], no_label_element_wrapper_class => ['col-lg-offset-2'], }, }} has_field 'Checkboxes' => ( type => 'Compound', do_wrapper => 1, do_label => 1, ); has_field 'Checkboxes.option1' => ( type => 'Checkbox', do_wrapper => 0, do_label => 0, tags => { 'inline' => 1 }, ); has_field 'Checkboxes.option2' => ( type => 'Checkbox', do_wrapper => 0, do_label => 0, tags => { 'inline' => 1 }, ); has_field 'Checkboxes.option3' => ( type => 'Checkbox', do_wrapper => 0, do_label => 0, tags => { 'inline' => 1 }, ); } my $form = MyApp::Form::Test->new; $form->process; my $expected = '
'; is_html( $form->field('Checkboxes')->render, $expected, 'inline checkboxes rendered ok' ); done_testing;