Skip to content

Miscellaneous

textArea()

textArea() — returns any

Builds and returns a string containing a text area field form control based on the supplied objectName and property. Note: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.

NameTypeRequiredDefaultDescription
objectNameanyyes—See documentation for textField.
propertystringyes—See documentation for textField.
associationstringyes—See documentation for textfield.
positionstringyes—See documentation for textfield.
labelstringyesuseDefaultLabelSee documentation for textField.
labelPlacementstringyesaroundSee documentation for textField.
prependstringyes—See documentation for textField.
appendstringyes—See documentation for textField.
prependToLabelstringyes—See documentation for textField.
appendToLabelstringyes—See documentation for textField.
errorElementstringyesspanSee documentation for textField.
errorClassstringyesfieldWithErrorsSee documentation for textField.
<!--- Provide `label` and required `objectName` and `property` --->
<cfoutput>
    #textArea(label="Overview", objectName="article", property="overview")#
</cfoutput>

<!--- Display fields for photos provided by the `screenshots` association and nested properties --->
<fieldset>
	<legend>Screenshots</legend>
	<cfloop from="1" to="#ArrayLen(site.screenshots)#" index="i">
		#fileField(label="File #i#", objectName="site", association="screenshots", position=i, property="file")#
		#textArea(label="Caption ####i##", objectName="site", association="screenshots", position=i, property="caption")#
	</cfloop>
</fieldset>