[racket] textarea-input formlet | How to specify rows & cols

From: Horace Dynamite (horace.dynamite at gmail.com)
Date: Wed Aug 4 15:19:28 EDT 2010

I'm really struggling to understand how to use these formlets, so
please bear with me here :-)
I've been playing with the continue blog application, and instead of
input fields consisting of just a single row when you're adding a new
post, I'd like to have a TEXTAREA field instead for the post body.

I've got the following formlets,

(define make-post-formlet
    (div ((class "make-post-title"))
    "Title:" ,{input-string . => . title})
    (div ((class "make-post-body"))
     "Post:" ,{(textarea-input) . => . post})
    (input ((type "submit"))))
   (list title post)))

(define display-post-confirm
    [(list title post)
       (head (title "Post confirm page"))
        "Post title: " ,title
        "Post contents:" ,post))]))

Notice in make-post-formlet, I'm using the predefined textarea-input
formlet. A lot of the other formlets have optional attributes you can
set specifying various features of that particular HTML entity, but I
don't understand how to specify the row and column size for the
textarea-input formlet.

Any help on how to do this, or whether I should be considering a
different approach would be much appreciated.



Posted on the users mailing list.