Skip to content

Miscellaneous

hiddenField()

hiddenField() — returns any

Builds and returns a string containing a hidden 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.
<!--- Provide an `objectName` and `property` --->
<cfoutput>
    #hiddenField(objectName="user", property="id")#
</cfoutput>