Sha256: 3b2528dae5e57e0f30873af30a7695ec4c720e6f3558fa4a7fcaea86828cc4c7

Contents?: true

Size: 970 Bytes

Versions: 8

Compression:

Stored size: 970 Bytes

Contents

# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
  config.wrappers :foundation, :class => :input, :hint_class => :field_with_hint, :error_class => :error do |b|
    b.use :html5
    b.use :placeholder
    b.optional :maxlength
    b.optional :pattern
    b.optional :min_max
    b.optional :readonly
    b.use :label_input
    b.use :error, :wrap_with => { :tag => :small }

    # Uncomment the following line to enable hints. The line is commented out by default since Foundation
    # does't provide styles for hints. You will need to provide your own CSS styles for hints.
    # b.use :hint,  :wrap_with => { :tag => :span, :class => :hint }
  end

  # CSS class for buttons
  config.button_class = 'button'

  # CSS class to add for error notification helper.
  config.error_notification_class = 'alert-box alert'

  # The default wrapper to be used by the FormBuilder.
  config.default_wrapper = :foundation
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
simple_form-2.1.3 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form-2.1.2 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form-2.1.1 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form_awesome-2.5.0 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form_awesome-2.4.0 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form_awesome-2.3.0 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form_awesome-2.2.0 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
simple_form-2.1.0 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb