class Forme::InputsWrapper::Bootstrap3

Use a <fieldset> tag to wrap the inputs.

Registered as :bs3.

Public Instance Methods

call(form, opts) { || ... } click to toggle source
    # File lib/forme/bs3.rb
225 def call(form, opts, &block)
226   attr = opts[:attr] ? opts[:attr].dup : {}
227   Forme.attr_classes(attr, 'inputs')
228   if legend = opts[:legend]
229     form.tag(:fieldset, attr) do
230       form.tag(:legend, opts[:legend_attr], legend)
231       yield
232     end
233   else
234     form.tag(:fieldset, attr, &block)
235   end
236 end