00792: Add ability to pre-fill "textarea" input control with a value

Summary: Add ability to pre-fill "textarea" input control with a value
Created: 2006-08-24 13:44
Status: Closed (exists with the escape markup)
Category: Feature
From: Pm
Priority: 55444 433
Version: 2.1.14

Description: Currently the (:input textarea:) markup doesn't have a convenient way of pre-filling the contents of the textarea. We should find a good way to do this.

The primary stumbling block at the moment is having a good markup for it. Suggestions welcomed below. Votes welcomed above.


To specify a multiline textarea content in the wiki page, enclose it with value=[=...content here...=].

(:input form:)
(:input textarea t1 value="[=Multiline 
content=]" cols=20 rows=3:)
(:input textarea t2 [=Multi
content=] cols=20 rows=3:)
(:input end:)

So, the recipe Cookbook:Textarea is no longer needed... --Petko August 26, 2009, at 09:27 AM

In UpdateForm I implemented this with the same value= markup that the other form tags use, for example (:update type=textarea name=fieldname value="default text":) or just (:update textarea fieldname "default text":) Users need not know that the <textarea> HTML tag has no value parameter; all that matters is that the (:input:) tag has one!

Ben Stallings August 24, 2006, at 05:02 PM

The downside of this is that it doesn't allow multi-line content for the pre-filled textarea, and since half the point of having a textarea is that it uses multi-line input, I don't think it quite fits the bill.
Kathryn Andersen August 24, 2006, at 05:43 PM
Does it not allow multiple lines using \\? (Simple tables do - so it's worth trying, if you haven't.) - TeganDowling