Play Framework forms: specifying @textarea rows and columns

To specify the rows and columns in a Play Framework 2.1.x form field, use a syntax like this:

    '_label -> "Notes",
    'placeholder -> "Any notes you want to add",
    'rows -> 5,
    'cols -> 60

The textarea documentation shows that you can also specify the textarea size like this:

@textarea(field = myForm("address"), args = 'rows -> 3, 'cols -> 50)

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.