Skip to content

Commit

Permalink
Merge pull request #569 from dlee/add_inline_label_to_readme
Browse files Browse the repository at this point in the history
Add docs for inline_label to README (Issue #568)
  • Loading branch information
rafaelfranca committed May 10, 2012
2 parents 496f014 + 977ed48 commit c6c6561
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ This will generate an entire form with labels for user name and password as well
by default when you render the form with invalid data (after submitting for example).

You can overwrite the default label by passing it to the input method. You can also add a hint or
even a placeholder:
even a placeholder. For boolean inputs, you can add an inline label as well:

```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 => '[email protected]' %>
<%= f.input :remember_me, :inline_label => '<b>Yes, remember me</b>'.html_safe %>
<%= f.button :submit %>
<% end %>
```
Expand Down

0 comments on commit c6c6561

Please sign in to comment.