Textarea height option
Textarea height option
Loren Maxwell
Posts: 464Questions: 113Answers: 10
in Editor
Would be nice to be able to specify the default height of a textarea when the form is displayed.
Sometimes I want a rather small textarea, such as 5rem, and other times I want a rather large one, such as 20rem, depending on how much I want to encourage someone to write.
{
type: 'textarea',
label: 'Summary:',
name: 'summary',
height: '5rem',
attr: {
placeholder: 'Please enter a brief summary here (limit 255 characters)'
}
},
{
type: 'textarea',
label: 'Description:',
name: 'description',
height: '20rem',
attr: {
placeholder: 'Please enter a full description here'
}
}
This question has an accepted answers - jump to answer
Answers
Ah never mind -- I just realized there was a "rows" attribute I had overlooked.
For anyone interested, this is the correct solution:
You can also use CSS to do it:
Allan