gshank/html-formhandler

radio inline with Bootstrap3

Opened this issue · 1 comments

duxy commented

Hi,

I tried to render radio group inline with Bootstrap3 and the only way it worked was to change radio_element_wrapper => 0 in HTML::FormHandler::Widget::Wrapper::Bootstrap3 and also in HTML::FormHandler::Widget::Field::RadioGroup line 92 should be @label_class = $class; since only class="radio-inline" is necessary in latest Bootstrap3.
Is there a better way for this?

Probably same issue with checkboxes that I would like to inline. (http://getbootstrap.com/css/#forms-controls)

I tried setting the label class using

label_class => ['checkbox-inline']

and

label_attr => {class =>'checkbox-inline'}

but neither resulted in the css class being added to the rendered HTML.

There is a test for inlined checkboxes. https://github.com/gshank/html-formhandler/blob/master/t/bootstrap3/inlinecheckboxes.t