Skip to content

Commit 984548a

Browse files
committed
fixed markdown on form guide
1 parent 63a1ed5 commit 984548a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/reactive_components/300-forms/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,15 @@ Read more about success and failure behavior customization at the [form api docu
197197
Inside a form you can use our form input components `form_input`, `form_textarea`, `form_select`, `form_radio` and `form_checkbox`. Do not use the basic input components `input`, `textarea` and so on, because they do not work with matestack forms. Instead use the _form input_ components. Each input component requires a `:key` which represents the params name as which this inputs value get's submitted. If you specified an active record object or similar in the `form` with the `:for` options, inputs will be prefilled with the value of the corresponding attribute or method of the object. It is also possible to specify `:label` in order to create labels for the input on the fly.
198198

199199
* `form_input` - Represents a html "input". All w3c specified input types are supported by this component, just pass in your wanted type with the `:type` option.
200+
200201
```ruby
201202
form_input key: :name, type: :text, label: 'Name'
202203
form_input key: :age, type: :number, label: 'Age'
203204
form_input key: :password, type: :password, label: 'Password'
204205
```
205206

206207
* `form_textarea` - Represents a html "textarea".
208+
207209
```ruby
208210
form_textarea key: :description, label: 'Description'
209211
```

0 commit comments

Comments
 (0)