Miscellaneous
passwordField()
Signature
Section titled “Signature”passwordField() — returns any
Description
Section titled “Description”Builds and returns a string containing a password 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.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
objectName | any | yes | — | See documentation for textField. |
property | string | yes | — | See documentation for textField. |
association | string | yes | — | See documentation for textfield. |
position | string | yes | — | See documentation for textfield. |
label | string | yes | useDefaultLabel | See documentation for textField |
labelPlacement | string | yes | around | See documentation for textField. |
prepend | string | yes | — | See documentation for textField. |
append | string | yes | — | See documentation for textField. |
prependToLabel | string | yes | — | See documentation for textField. |
appendToLabel | string | yes | — | See documentation for textField. |
errorElement | string | yes | span | See documentation for textField. |
errorClass | string | yes | fieldWithErrors | See documentation for textField. |
Examples
Section titled “Examples”<!--- Provide a `label` and the required `objectName` and `property` --->
<cfoutput>
#passwordField(label="Password", objectName="user", property="password")#
</cfoutput>
<!--- Display fields for passwords provided by the `passwords` association and nested properties --->
<fieldset>
<legend>Passwords</legend>
<cfloop from="1" to="##ArrayLen(user.passwords)##" index="i">
#passwordField(label="Password ####i##", objectName="user", association="passwords", position=i, property="password")#
</cfloop>
</fieldset>