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.
Name | Type | Required | Default | Description |
---|---|---|---|---|
objectName | any | Yes | See documentation for textField. | |
property | string | Yes | See documentation for textField. | |
association | string | No | See documentation for textfield. | |
position | string | No | See documentation for textfield. | |
label | string | No | useDefaultLabel | See documentation for textField |
labelPlacement | string | No | around | See documentation for textField. |
prepend | string | No | See documentation for textField. | |
append | string | No | See documentation for textField. | |
prependToLabel | string | No | See documentation for textField. | |
appendToLabel | string | No | See documentation for textField. | |
errorElement | string | No | span | See documentation for textField. |
errorClass | string | No | fieldWithErrors | See documentation for textField. |
<!--- 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>