-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Its been quite painful to style Formtastic's HTML in #3862 that I'd like to update it to use a simpler component based approach like you see in Bootstrap or Foundation. I very much like Bootstrap's approach of using a form-control class instead of targeting HTML elements and applying defaults. Further styling fieldsets is incredibly painful across browsers. We have a panel component in #3862 which we should be reusing there. Or just using a different presentation for form headers.
We can customize the HTML output but it would require that we subclass each input class and override the input_wrapping method to use a new approach. Although the problem is that the fieldset_wrapper.rb helper generates not just the <fieldset> element but the <ol> as well which isn't good.
Further digging shows that form_builder.rb actually opens up the Formtastic::Inputs::Base module to override the input_wrapping method which for me was unexpected.
A good idea which could be quite challenging is switching to simple_form which is maintained and better documented. It has easier way of namespacing and customizing without having to subclass everything. It was built with customization in mind.