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
objectNameanyyesSee documentation for textField.
propertystringyesSee documentation for textField.
associationstringyesSee documentation for textfield.
positionstringyesSee documentation for textfield.
labelstringyesuseDefaultLabelSee documentation for textField.
labelPlacementstringyesaroundSee documentation for textField.
prependstringyesSee documentation for textField.
appendstringyesSee documentation for textField.
prependToLabelstringyesSee documentation for textField.
appendToLabelstringyesSee 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>