Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove useless indent from code blocs in readme [ci skip]

  • Loading branch information...
commit 9f7a7bcbb9323e91cf8b9261bf2b31c2a174b342 1 parent f2e073c
Carlos Antonio da Silva carlosantoniodasilva authored
Showing with 210 additions and 210 deletions.
  1. +210 −210 README.md
420 README.md
View
@@ -55,11 +55,11 @@ SimpleForm was designed to be customized as you need to. Basically it's a stack
To start using SimpleForm you just have to use the helper it provides:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username %>
- <%= f.input :password %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username %>
+ <%= f.input :password %>
+ <%= f.button :submit %>
+<% end %>
```
This will generate an entire form with labels for user name and password as well, and render errors by default when you render the form with invalid data (after submitting for example).
@@ -67,79 +67,79 @@ This will generate an entire form with labels for user name and password as well
You can overwrite the default label by passing it to the input method, add a hint or even a placeholder:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username, :label => 'Your username please' %>
- <%= f.input :password, :hint => 'No special characters.' %>
- <%= f.input :email, :placeholder => 'user@domain.com' %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username, :label => 'Your username please' %>
+ <%= f.input :password, :hint => 'No special characters.' %>
+ <%= f.input :email, :placeholder => 'user@domain.com' %>
+ <%= f.button :submit %>
+<% end %>
```
You can also disable labels, hints or error or configure the html of any of them:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username, :label_html => { :class => 'my_class' } %>
- <%= f.input :password, :hint => false, :error_html => { :id => "password_error"} %>
- <%= f.input :password_confirmation, :label => false %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username, :label_html => { :class => 'my_class' } %>
+ <%= f.input :password, :hint => false, :error_html => { :id => "password_error"} %>
+ <%= f.input :password_confirmation, :label => false %>
+ <%= f.button :submit %>
+<% end %>
```
It is also possible to pass any html attribute straight to the input, by using the :input_html option, for instance:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username, :input_html => { :class => 'special' } %>
- <%= f.input :password, :input_html => { :maxlength => 20 } %>
- <%= f.input :remember_me, :input_html => { :value => '1' } %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username, :input_html => { :class => 'special' } %>
+ <%= f.input :password, :input_html => { :maxlength => 20 } %>
+ <%= f.input :remember_me, :input_html => { :value => '1' } %>
+ <%= f.button :submit %>
+<% end %>
```
If you want to pass the same :input_html to all inputs in the form (for example, a default class), you can use the :defaults option in `simple_form_for`. Specific options in :input_html will overwrite the defaults:
```erb
- <%= simple_form_for @user, :defaults => { :class => 'default_class' } do |f| %>
- <%= f.input :username, :input_html => { :class => 'special' } %>
- <%= f.input :password, :input_html => { :maxlength => 20 } %>
- <%= f.input :remember_me, :input_html => { :value => '1' } %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user, :defaults => { :class => 'default_class' } do |f| %>
+ <%= f.input :username, :input_html => { :class => 'special' } %>
+ <%= f.input :password, :input_html => { :maxlength => 20 } %>
+ <%= f.input :remember_me, :input_html => { :value => '1' } %>
+ <%= f.button :submit %>
+<% end %>
```
Since simple_form generates a wrapper div around your label and input by default, you can pass any html attribute to that wrapper as well using the :wrapper_html option, like so:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username, :wrapper_html => { :class => 'username' } %>
- <%= f.input :password, :wrapper_html => { :id => 'password' } %>
- <%= f.input :remember_me, :wrapper_html => { :class => 'options' } %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username, :wrapper_html => { :class => 'username' } %>
+ <%= f.input :password, :wrapper_html => { :id => 'password' } %>
+ <%= f.input :remember_me, :wrapper_html => { :class => 'options' } %>
+ <%= f.button :submit %>
+<% end %>
```
By default all inputs are required, which means an * is prepended to the label, but you can disable it in any input you want:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :name, :required => false %>
- <%= f.input :username %>
- <%= f.input :password %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :name, :required => false %>
+ <%= f.input :username %>
+ <%= f.input :password %>
+ <%= f.button :submit %>
+<% end %>
```
SimpleForm also lets you overwrite the default input type it creates:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username %>
- <%= f.input :password %>
- <%= f.input :description, :as => :text %>
- <%= f.input :accepts, :as => :radio %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username %>
+ <%= f.input :password %>
+ <%= f.input :description, :as => :text %>
+ <%= f.input :accepts, :as => :radio %>
+ <%= f.button :submit %>
+<% end %>
```
So instead of a checkbox for the :accepts attribute, you'll have a pair of radio buttons with yes/no labels and a text area instead of a text field for the description. You can also render boolean attributes using :as => :select to show a dropdown.
@@ -147,34 +147,34 @@ So instead of a checkbox for the :accepts attribute, you'll have a pair of radio
It is also possible to give the :disabled option to SimpleForm, and it'll automatically mark the wrapper as disabled with a css class, so you can style labels, hints and other components inside the wrapper as well:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username, :disabled => true, :hint => "You cannot change your username." %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username, :disabled => true, :hint => "You cannot change your username." %>
+ <%= f.button :submit %>
+<% end %>
```
SimpleForm accepts same options as their corresponding input type helper in Rails:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :date_of_birth, :as => :date, :start_year => Date.today.year - 90,
- :end_year => Date.today.year - 12, :discard_day => true,
- :order => [:month, :year] %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :date_of_birth, :as => :date, :start_year => Date.today.year - 90,
+ :end_year => Date.today.year - 12, :discard_day => true,
+ :order => [:month, :year] %>
+ <%= f.button :submit %>
+<% end %>
```
SimpleForm also allows you to use label, hint, input_field, error and full_error helpers it provides (please take a look at the rdocs for each method for more info):
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.label :username %>
- <%= f.input_field :username %>
- <%= f.hint 'No special characters, please!' %>
- <%= f.error :username, :id => 'user_name_error' %>
- <%= f.full_error :token %>
- <%= f.submit 'Save' %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.label :username %>
+ <%= f.input_field :username %>
+ <%= f.hint 'No special characters, please!' %>
+ <%= f.error :username, :id => 'user_name_error' %>
+ <%= f.full_error :token %>
+ <%= f.submit 'Save' %>
+<% end %>
```
Any extra option passed to these methods will be rendered as html option.
@@ -184,11 +184,11 @@ Any extra option passed to these methods will be rendered as html option.
And what if you want to create a select containing the age from 18 to 60 in your form? You can do it overriding the :collection option:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :user %>
- <%= f.input :age, :collection => 18..60 %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :user %>
+ <%= f.input :age, :collection => 18..60 %>
+ <%= f.button :submit %>
+<% end %>
```
Collections can be arrays or ranges, and when a :collection is given the :select input will be rendered by default, so we don't need to pass the :as => :select option. Other types of collection are :radio and :check_boxes. Those are added by SimpleForm to Rails set of form helpers (read Extra Helpers session below for more information).
@@ -202,13 +202,13 @@ Collection inputs accept two other options beside collections:
Those methods are useful to manipulate the given collection. Both of these options also accept lambda/procs in case you want to calculate the value or label in a special way eg. custom translation. All other options given are sent straight to the underlying helper. For example, you can give prompt as:
```ruby
- f.input :age, :collection => 18..60, :prompt => "Select your age"
+f.input :age, :collection => 18..60, :prompt => "Select your age"
```
It is also possible to create grouped collection selects, that will use the html `optgroup` tags, like this:
```ruby
- f.input :country_id, :collection => @continents, :as => :grouped_select, :group_method => :countries
+f.input :country_id, :collection => @continents, :as => :grouped_select, :group_method => :countries
```
Grouped collection inputs accept the same `:label_method` and `:value_method` options, which will be used to retrieve label/value attributes for the `option` tags. Besides that, you can give:
@@ -222,8 +222,8 @@ Grouped collection inputs accept the same `:label_method` and `:value_method` op
SimpleForm also supports :time_zone and :country. When using such helpers, you can give :priority as option to select which time zones and/or countries should be given higher priority:
```ruby
- f.input :residence_country, :priority => [ "Brazil" ]
- f.input :time_zone, :priority => /US/
+f.input :residence_country, :priority => [ "Brazil" ]
+f.input :time_zone, :priority => /US/
```
Those values can also be configured with a default value to be used site use through the SimpleForm.country_priority and SimpleForm.time_zone_priority helpers.
@@ -231,7 +231,7 @@ Those values can also be configured with a default value to be used site use thr
Note: While using country_select if you want to restrict to only a subset of countries for a specific drop down then you may use the :collection option:
```ruby
- f.input :shipping_country, :priority => [ "Brazil" ], :collection => [ "Australia", "Brazil", "New Zealand"]
+f.input :shipping_country, :priority => [ "Brazil" ], :collection => [ "Australia", "Brazil", "New Zealand"]
```
### Wrapper
@@ -240,17 +240,17 @@ SimpleForm allows you to add a wrapper which contains the label, error, hint and
The first step is to configure a wrapper tag:
```ruby
- SimpleForm.wrapper_tag = :p
+SimpleForm.wrapper_tag = :p
```
And now, you don't need to wrap your f.input calls anymore:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :username %>
- <%= f.input :password %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :username %>
+ <%= f.input :password %>
+ <%= f.button :submit %>
+<% end %>
```
## Associations
@@ -258,42 +258,42 @@ And now, you don't need to wrap your f.input calls anymore:
To deal with associations, SimpleForm can generate select inputs, a series of radios or check boxes. Lets see how it works: imagine you have a user model that belongs to a company and has_and_belongs_to_many roles. The structure would be something like:
```ruby
- class User < ActiveRecord::Base
- belongs_to :company
- has_and_belongs_to_many :roles
- end
+class User < ActiveRecord::Base
+ belongs_to :company
+ has_and_belongs_to_many :roles
+end
- class Company < ActiveRecord::Base
- has_many :users
- end
+class Company < ActiveRecord::Base
+ has_many :users
+end
- class Role < ActiveRecord::Base
- has_and_belongs_to_many :users
- end
+class Role < ActiveRecord::Base
+ has_and_belongs_to_many :users
+end
```
Now we have the user form:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :name %>
- <%= f.association :company %>
- <%= f.association :roles %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :name %>
+ <%= f.association :company %>
+ <%= f.association :roles %>
+ <%= f.button :submit %>
+<% end %>
```
Simple enough right? This is going to render a :select input for choosing the :company, and another :select input with :multiple option for the :roles. You can of course change it, to use radios and check boxes as well:
```ruby
- f.association :company, :as => :radio
- f.association :roles, :as => :check_boxes
+f.association :company, :as => :radio
+f.association :roles, :as => :check_boxes
```
The association helper just invokes input under the hood, so all options available to :select, :radio and :check_boxes are also available to association. Additionally, you can specify the collection by hand, all together with the prompt:
```ruby
- f.association :company, :collection => Company.active.all(:order => 'name'), :prompt => "Choose a Company"
+f.association :company, :collection => Company.active.all(:order => 'name'), :prompt => "Choose a Company"
```
## Buttons
@@ -301,10 +301,10 @@ The association helper just invokes input under the hood, so all options availab
All web forms need buttons, right? SimpleForm wraps them in the DSL, acting like a proxy:
```erb
- <%= simple_form_for @user do |f| %>
- <%= f.input :name %>
- <%= f.button :submit %>
- <% end %>
+<%= simple_form_for @user do |f| %>
+ <%= f.input :name %>
+ <%= f.button :submit %>
+<% end %>
```
The above will simply call submit. You choose to use it or not, it's just a question of taste.
@@ -314,9 +314,9 @@ The above will simply call submit. You choose to use it or not, it's just a ques
Say you wanted to use a rails form helper but still wrap it in SimpleForm goodness? You can, by calling input with a block like so:
```erb
- <%= f.input :role do %>
- <%= f.select :role, Role.all.map { |r| [r.name, r.id, { :class => r.company.id }] }, :include_blank => true %>
- <% end %>
+<%= f.input :role do %>
+ <%= f.select :role, Role.all.map { |r| [r.name, r.id, { :class => r.company.id }] }, :include_blank => true %>
+<% end %>
```
In the above example, we're taking advantage of Rails 3's select method that allows us to pass in a hash of additional attributes for each option.
@@ -330,12 +330,12 @@ SimpleForm also comes with some extra helpers you can use inside rails default f
Wrapper to use simple form inside a default rails form
```ruby
- form_for @user do |f|
- f.simple_fields_for :posts do |posts_form|
- # Here you have all simple_form methods available
- posts_form.input :title
- end
+form_for @user do |f|
+ f.simple_fields_for :posts do |posts_form|
+ # Here you have all simple_form methods available
+ posts_form.input :title
end
+end
```
### Collection Radio
@@ -343,16 +343,16 @@ Wrapper to use simple form inside a default rails form
Creates a collection of radio inputs with labels associated (same API as collection_select):
```ruby
- form_for @user do |f|
- f.collection_radio :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
- end
+form_for @user do |f|
+ f.collection_radio :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
+end
```
```html
- <input id="user_options_true" name="user[options]" type="radio" value="true" />
- <label class="collection_radio" for="user_options_true">Yes</label>
- <input id="user_options_false" name="user[options]" type="radio" value="false" />
- <label class="collection_radio" for="user_options_false">No</label>
+<input id="user_options_true" name="user[options]" type="radio" value="true" />
+<label class="collection_radio" for="user_options_true">Yes</label>
+<input id="user_options_false" name="user[options]" type="radio" value="false" />
+<label class="collection_radio" for="user_options_false">No</label>
```
### Collection Check Box
@@ -360,26 +360,26 @@ Creates a collection of radio inputs with labels associated (same API as collect
Creates a collection of check boxes with labels associated (same API as collection_select):
```ruby
- form_for @user do |f|
- f.collection_check_boxes :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
- end
+form_for @user do |f|
+ f.collection_check_boxes :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
+end
```
```html
- <input name="user[options][]" type="hidden" value="" />
- <input id="user_options_true" name="user[options][]" type="checkbox" value="true" />
- <label class="collection_check_box" for="user_options_true">Yes</label>
- <input name="user[options][]" type="hidden" value="" />
- <input id="user_options_false" name="user[options][]" type="checkbox" value="false" />
- <label class="collection_check_box" for="user_options_false">No</label>
+<input name="user[options][]" type="hidden" value="" />
+<input id="user_options_true" name="user[options][]" type="checkbox" value="true" />
+<label class="collection_check_box" for="user_options_true">Yes</label>
+<input name="user[options][]" type="hidden" value="" />
+<input id="user_options_false" name="user[options][]" type="checkbox" value="false" />
+<label class="collection_check_box" for="user_options_false">No</label>
```
To use this with associations in your model, you can do the following:
```ruby
- form_for @user do |f|
- f.collection_check_boxes :role_ids, Role.all, :id, :name # using :roles here is not going to work.
- end
+form_for @user do |f|
+ f.collection_check_boxes :role_ids, Role.all, :id, :name # using :roles here is not going to work.
+end
```
## Mappings/Inputs available
@@ -416,29 +416,29 @@ SimpleForm comes with a lot of default mappings:
It is very easy to add custom inputs to SimpleForm. For instance, if you want to add a custom input that extends the string one, you just need to add this file:
```ruby
- # app/inputs/currency_input.rb
- class CurrencyInput < SimpleForm::Inputs::Base
- def input
- "$ #{@builder.text_field(attribute_name, input_html_options)}".html_safe
- end
- end
+# app/inputs/currency_input.rb
+class CurrencyInput < SimpleForm::Inputs::Base
+ def input
+ "$ #{@builder.text_field(attribute_name, input_html_options)}".html_safe
+ end
+end
```
And use it in your views:
```ruby
- f.input :money, :as => :currency
+f.input :money, :as => :currency
```
You can also redefine existing SimpleForm inputs by creating a new class with the same name. For instance, if you want to wrap date/time/datetime in a div, you can do:
```ruby
- # app/inputs/date_time_input.rb
- class DateTimeInput < SimpleForm::Inputs::DateTimeInput
- def input
- "<div>#{super}</div>".html_safe
- end
- end
+# app/inputs/date_time_input.rb
+class DateTimeInput < SimpleForm::Inputs::DateTimeInput
+ def input
+ "<div>#{super}</div>".html_safe
+ end
+end
```
## Custom form builder
@@ -448,21 +448,21 @@ You can create a custom form builder that uses SimpleForm.
Create a helper method that calls simple_form_for with a custom builder:
```ruby
- def custom_form_for(object, *args, &block)
- options = args.extract_options!
- simple_form_for(object, *(args << options.merge(:builder => CustomFormBuilder)), &block)
- end
+def custom_form_for(object, *args, &block)
+ options = args.extract_options!
+ simple_form_for(object, *(args << options.merge(:builder => CustomFormBuilder)), &block)
+end
```
Create a form builder class that inherits from SimpleForm::FormBuilder.
```ruby
- class CustomFormBuilder < SimpleForm::FormBuilder
- def input(attribute_name, options = {}, &block)
- options[:input_html].merge! :class => 'custom'
- super
- end
+class CustomFormBuilder < SimpleForm::FormBuilder
+ def input(attribute_name, options = {}, &block)
+ options[:input_html].merge! :class => 'custom'
+ super
end
+end
```
## I18n
@@ -470,20 +470,20 @@ Create a form builder class that inherits from SimpleForm::FormBuilder.
SimpleForm uses all power of I18n API to lookup labels, hints and placeholders. To customize your forms you can create a locale file like this:
```yaml
- en:
- simple_form:
- labels:
- user:
- username: 'User name'
- password: 'Password'
- hints:
- user:
- username: 'User name to sign in.'
- password: 'No special characters, please.'
- placeholders:
- user:
- username: 'Your username'
- password: '****'
+en:
+ simple_form:
+ labels:
+ user:
+ username: 'User name'
+ password: 'Password'
+ hints:
+ user:
+ username: 'User name to sign in.'
+ password: 'No special characters, please.'
+ placeholders:
+ user:
+ username: 'Your username'
+ password: '****'
```
And your forms will use this information to render the components for you.
@@ -491,36 +491,36 @@ And your forms will use this information to render the components for you.
SimpleForm also lets you be more specific, separating lookups through actions for labels, hints and placeholders. Let's say you want a different label for new and edit actions, the locale file would be something like:
```yaml
- en:
- simple_form:
- labels:
- user:
- username: 'User name'
- password: 'Password'
- edit:
- username: 'Change user name'
- password: 'Change password'
+en:
+ simple_form:
+ labels:
+ user:
+ username: 'User name'
+ password: 'Password'
+ edit:
+ username: 'Change user name'
+ password: 'Change password'
```
This way SimpleForm will figure out the right translation for you, based on the action being rendered. And to be a little bit DRYer with your locale file, you can specify defaults for all models under the 'defaults' key:
```yaml
- en:
- simple_form:
- labels:
- defaults:
- username: 'User name'
- password: 'Password'
- new:
- username: 'Choose a user name'
- hints:
- defaults:
- username: 'User name to sign in.'
- password: 'No special characters, please.'
- placeholders:
- defaults:
- username: 'Your username'
- password: '****'
+en:
+ simple_form:
+ labels:
+ defaults:
+ username: 'User name'
+ password: 'Password'
+ new:
+ username: 'Choose a user name'
+ hints:
+ defaults:
+ username: 'User name to sign in.'
+ password: 'No special characters, please.'
+ placeholders:
+ defaults:
+ username: 'Your username'
+ password: '****'
```
SimpleForm will always look for a default attribute translation under the "defaults" key if no specific is found inside the model key.Note that this syntax is different from 1.x. To migrate to the new syntax, just move "labels.#{attribute}" to "labels.defaults.#{attribute}".
@@ -530,19 +530,19 @@ In addition, SimpleForm will fallback to default human_attribute_name from Rails
SimpleForm also has support for translating options in collection helpers. For instance, given a User with a `:gender` attribute, you might want to create a select box showing translated labels that would post either `male` or `female` as value. With SimpleForm you could create an input like this:
```ruby
- f.input :gender, :collection => [:male, :female]
+f.input :gender, :collection => [:male, :female]
```
And SimpleForm will try a lookup like this in your locale file, to find the right labels to show:
```yaml
- en:
- simple_form:
- options:
- user:
- gender:
- male: 'Male'
- female: "Female'
+en:
+ simple_form:
+ options:
+ user:
+ gender:
+ male: 'Male'
+ female: "Female'
```
You can also use the `defaults` key as you would do with labels, hints and placeholders. It is important to notice that SimpleForm will only do the lookup for options if you give a collection composed of symbols only. This is to avoid constant lookups to I18n.
@@ -550,12 +550,12 @@ You can also use the `defaults` key as you would do with labels, hints and place
It's also possible to translate buttons, using Rails' built-in I18n support:
```yaml
- en:
- helpers:
- submit:
- user:
- create: "Add %{model}"
- update: "Save Changes"
+en:
+ helpers:
+ submit:
+ user:
+ create: "Add %{model}"
+ update: "Save Changes"
```
There are other options that can be configured through I18n API, such as required text and boolean. Be sure to check our locale file or the one copied to your application after you run "rails generate simple_form:install".
@@ -569,13 +569,13 @@ Most browsers will not care, but some of the newer ones - in particular Chrome 1
It is possible to disable all HTML 5 extensions in SimpleForm with the following configuration:
```ruby
- SimpleForm.html5 = false # default is true
+SimpleForm.html5 = false # default is true
```
If you want to have all other HTML 5 features, such as the new field types, you can disable only the browser validation:
```ruby
- SimpleForm.browser_validations = false # default is true
+SimpleForm.browser_validations = false # default is true
```
This option adds a new `novalidate` property to the form, instructing it to skip all HTML 5 validation. The inputs will still be generated with the required and other attributes, that might help you to use some generic javascript validation.
@@ -583,7 +583,7 @@ This option adds a new `novalidate` property to the form, instructing it to skip
You can also add `novalidate` to a specific form by setting the option on the form itself:
```erb
- <%= simple_form_for(resource, :html => {:novalidate => true}) do |form| %>
+<%= simple_form_for(resource, :html => {:novalidate => true}) do |form| %>
```
Please notice that any of the configurations above will disable the `placeholder` component, which is an HTML 5 feature. We believe most of the newest browsers are handling this attribute fine, and if they aren't, any plugin you use would take of using the placeholder attribute to do it. However, you can disable it if you want, by removing the placeholder component from the components list in SimpleForm configuration file.
Please sign in to comment.
Something went wrong with that request. Please try again.