mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Merge pull request #1115 from benlinton/update-readme-button-example
Update README button example code [ci skip]
This commit is contained in:
commit
c3bc4af79d
1 changed files with 6 additions and 0 deletions
|
@ -429,6 +429,12 @@ All web forms need buttons, right? **Simple Form** wraps them in the DSL, acting
|
||||||
|
|
||||||
The above will simply call submit. You choose to use it or not, it's just a question of taste.
|
The above will simply call submit. You choose to use it or not, it's just a question of taste.
|
||||||
|
|
||||||
|
The button method also accepts optional parameters, that are delegated to the underlying submit call:
|
||||||
|
|
||||||
|
```erb
|
||||||
|
<%= f.button :submit, "Custom Button Text", class: "my-button" %>
|
||||||
|
```
|
||||||
|
|
||||||
### Wrapping Rails Form Helpers
|
### Wrapping Rails Form Helpers
|
||||||
|
|
||||||
Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by
|
Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by
|
||||||
|
|
Loading…
Reference in a new issue