(Quick Reference)

passwordField

Purpose

Creates a input of type 'password' (a password field). An implicit "id" attribute is given the same value as name unless you explicitly specify one.

Examples

<g:passwordField name="myPasswordField" value="${myPassword}" />

Description

Attributes

  • name (required) - The name of the password field

  • value (optional) - The value of the password field

Configuration

Some attributes can be defined as Boolean values, but the html specification mandates the attribute must have the same value as its name. For example, disabled, readonly and checked. It may be desirable to have additional attributes (like required) behave the same way. This can be controlled with the following config value:

grails:
    tags:
        booleanToAttributes:
            - disabled
            - checked
            - readonly
            - required

Defaults are disabled, checked, readonly

Source

{source:tag=FormTagLib.passwordField} {source}