Skip to content

Commit

Permalink
Add docs for inline_label to README (Issue 568)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlee committed May 10, 2012
1 parent 496f014 commit 977ed48
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 => 'user@domain.com' %>
<%= f.input :remember_me, :inline_label => '<b>Yes, remember me</b>'.html_safe %>
<%= f.button :submit %>
<% end %>
```
Expand Down

0 comments on commit 977ed48

Please sign in to comment.