User Guide
416 Chapter 2: ColdFusion Tags
bind="Hello {userName.text}!
Enter your comments here." />
Example
This example has two cftextarea controls. When you submit the form, ColdFusion copies the
text from the first control into the second. The onBlur maxlength validation prevents you from
entering more than 100 characters. The > character that closes the
cftextarea opening tag, the
text in the tag body, and the
cftextarea closing tag are on a single line to ensure that only the
desired text displays, but the line is split in this example for formatting purposes.
<h3>cftextarea Example</h3>
<cfparam name="text2" default="">
<cfif isdefined("form.textarea1") AND (form.textarea1 NEQ "")>
<cfset text2=form.textarea1>
</cfif>
<cfform name="form1">
<cftextarea name="textarea1" wrap="virtual" rows="5" cols="25"
validate="maxlength" validateAt="onBlur" maxlength="100"
>Replace this text. Maximum length is 100 Characters, and this text is
currently 99 characters long.</cftextarea>
<cftextarea name="textarea2" wrap="virtual" rows="5" cols="50"
value="#text2#" /><br><br>
<input type="submit" value="submit field"><br>
</cfform>










