|
| 1 | +# Use this setup block to configure all options available in SimpleForm. |
| 2 | +SimpleForm.setup do |config| |
| 3 | + # Components used by the form builder to generate a complete input. You can remove |
| 4 | + # any of them, change the order, or even add your own components to the stack. |
| 5 | + # config.components = [ :placeholder, :label_input, :hint, :error ] |
| 6 | + |
| 7 | + # Default tag used on hints. |
| 8 | + # config.hint_tag = :span |
| 9 | + |
| 10 | + # CSS class to add to all hint tags. |
| 11 | + # config.hint_class = :hint |
| 12 | + |
| 13 | + # CSS class used on errors. |
| 14 | + # config.error_class = :error |
| 15 | + |
| 16 | + # Default tag used on errors. |
| 17 | + # config.error_tag = :span |
| 18 | + |
| 19 | + # Method used to tidy up errors. |
| 20 | + # config.error_method = :first |
| 21 | + |
| 22 | + # Default tag used for error notification helper. |
| 23 | + # config.error_notification_tag = :p |
| 24 | + |
| 25 | + # CSS class to add for error notification helper. |
| 26 | + # config.error_notification_class = :error_notification |
| 27 | + |
| 28 | + # ID to add for error notification helper. |
| 29 | + # config.error_notification_id = nil |
| 30 | + |
| 31 | + # You can wrap all inputs in a pre-defined tag. |
| 32 | + # config.wrapper_tag = :div |
| 33 | + |
| 34 | + # CSS class to add to all wrapper tags. |
| 35 | + # config.wrapper_class = :input |
| 36 | + |
| 37 | + # CSS class to add to the wrapper if the field has errors. |
| 38 | + # config.wrapper_error_class = :field_with_errors |
| 39 | + |
| 40 | + # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none. |
| 41 | + # config.collection_wrapper_tag = nil |
| 42 | + |
| 43 | + # You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span. |
| 44 | + # config.item_wrapper_tag = :span |
| 45 | + |
| 46 | + # Series of attempts to detect a default label method for collection. |
| 47 | + # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] |
| 48 | + |
| 49 | + # Series of attempts to detect a default value method for collection. |
| 50 | + # config.collection_value_methods = [ :id, :to_s ] |
| 51 | + |
| 52 | + # How the label text should be generated altogether with the required text. |
| 53 | + # config.label_text = lambda { |label, required| "#{required} #{label}" } |
| 54 | + |
| 55 | + # You can define the class to use on all labels. Default is nil. |
| 56 | + # config.label_class = nil |
| 57 | + |
| 58 | + # You can define the class to use on all forms. Default is simple_form. |
| 59 | + # config.form_class = :simple_form |
| 60 | + |
| 61 | + # Whether attributes are required by default (or not). Default is true. |
| 62 | + # config.required_by_default = true |
| 63 | + |
| 64 | + # Tell browsers whether to use default HTML5 validations (novalidate option). |
| 65 | + # Default is enabled. |
| 66 | + # config.browser_validations = true |
| 67 | + |
| 68 | + # Determines whether HTML5 types (:email, :url, :search, :tel) and attributes |
| 69 | + # (e.g. required) are used or not. True by default. |
| 70 | + # Having this on in non-HTML5 compliant sites can cause odd behavior in |
| 71 | + # HTML5-aware browsers such as Chrome. |
| 72 | + # config.html5 = true |
| 73 | + |
| 74 | + # Custom mappings for input types. This should be a hash containing a regexp |
| 75 | + # to match as key, and the input type that will be used when the field name |
| 76 | + # matches the regexp as value. |
| 77 | + # config.input_mappings = { /count/ => :integer } |
| 78 | + |
| 79 | + # Collection of methods to detect if a file type was given. |
| 80 | + # config.file_methods = [ :mounted_as, :file?, :public_filename ] |
| 81 | + |
| 82 | + # Default priority for time_zone inputs. |
| 83 | + # config.time_zone_priority = nil |
| 84 | + |
| 85 | + # Default priority for country inputs. |
| 86 | + # config.country_priority = nil |
| 87 | + |
| 88 | + # Default size for text inputs. |
| 89 | + # config.default_input_size = 50 |
| 90 | + |
| 91 | + # When false, do not use translations for labels, hints or placeholders. |
| 92 | + # config.translate = true |
| 93 | +end |
0 commit comments