Textarea Component API
matestack_form my_form_config do
form_textarea key: :foo, #...
endParameters
key - required
Defines the key which should be used when posting the form data to the server.
placeholder
Defines the placeholder.
label
Defines the label which will be rendered right before the textarea tag. You can also use the label component in order to create more complex label structures.
required
If set to true, HTML validations will be triggered on form submit.
init
If given, this value will be the initial value of the input. If used in an edit form of a given ActiveRecord model, the init value will be automatically derived from the model itself.
Custom Textarea
If you want to create your own textarea component, that's easily done since v.1.3.0.
Create your own Ruby component:
app/matestack/components/my_form_textarea.rb
Create the corresponding Vue.js component:
app/matestack/componenst/my_form_textarea.js
Don't forget to require the custom component JavaScript according to your JS setup!
Finally, use it within a
matestack_form:
Last updated
Was this helpful?