<bootstrap-fields>

bootstrap-fields provides HTML markup for an object in a manner suitable for use inside of Bootstrap’s form-horizontal.

bootstrap-fields implements a superset of the <feckless-fieldset> interface. We only document the differences here. Please read the <feckless-fieldset> documentation first.

Parameters

  • legend
  • with-fields-grouped
    • #{field_method}-field
      • #{field_method}-label
      • #{field_method}-view
        • view
          • #{field_method}-tag
      • #{field_method}-help

Attributes

  • size: # of columns in the grid system. Default is 12
  • columns: # of columns. Default is 1.
  • input-attrs: A ruby hash containing attributes to be merged onto each view. For example

<bootstrap-fields fields="foo,bar" input-attrs="&{:class => 'span9'}"/>

is equivalent to:

<bootstrap-fields fields="foo,bar">
  <foo-tag: class="span9"/>
  <bar-tag: class="span9"/>
</bootstrap-fields>

Show Source


Edit this page