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
objectNameanyyes—See documentation for textField.
propertystringyes—See documentation for textField.
associationstringyes—See documentation for textfield.
positionstringyes—See documentation for textfield.
<!--- Provide an `objectName` and `property` --->
<cfoutput>
    #hiddenField(objectName="user", property="id")#
</cfoutput>