Sha256: c287b0a9300aebd60ab2412cfd4996a738bf30a1f0647797426b70fd5f67cbe8

Contents?: true

Size: 946 Bytes

Versions: 58

Compression:

Stored size: 946 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

58 entries across 58 versions & 4 rubygems

Version Path
manage-1.4.3 config/initializers/simple_form_foundation.rb
manage-1.4.2 config/initializers/simple_form_foundation.rb
manage-1.4.1 config/initializers/simple_form_foundation.rb
manage-1.4 config/initializers/simple_form_foundation.rb
manage-1.3.52 config/initializers/simple_form_foundation.rb
manage-1.3.51 config/initializers/simple_form_foundation.rb
manage-1.3.50 config/initializers/simple_form_foundation.rb
simple_form-3.0.4 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
manage-1.3.49 config/initializers/simple_form_foundation.rb
manage-1.3.48 config/initializers/simple_form_foundation.rb
manage-1.3.47 config/initializers/simple_form_foundation.rb
manage-1.3.46 config/initializers/simple_form_foundation.rb
manage-1.3.45 config/initializers/simple_form_foundation.rb
manage-1.3.44 config/initializers/simple_form_foundation.rb
manage-1.3.43 config/initializers/simple_form_foundation.rb
simple_form-3.0.3 lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb
manage-1.3.42 config/initializers/simple_form_foundation.rb
manage-1.3.40 config/initializers/simple_form_foundation.rb
manage-1.3.39 config/initializers/simple_form_foundation.rb
manage-1.3.38 config/initializers/simple_form_foundation.rb