Password

Last updated Nov 10, 2026

Description

The Password field creates a text input that masks characters as they are typed. The masking only applies in the editor: the value is stored as plain text, the same as a Text field.

Screenshots

Creating a Password field in the ACF UI.

Creating a Password field.

Settings on the Presentation tab allow you to control how the Password field will appear.

Settings on the Presentation tab allow you to control how the Password field will appear.

How the password field might appear to content editors. Instructions added in the Presentation tab are visible here.

How the password field might appear to content editors. Instructions added in the Presentation tab are visible here.

Settings

  • Required
    Found on the Validation tab, this prevents the field from accepting empty values. Defaults to off.

  • Instructions
    Shows instructions when submitting data.

  • Placeholder Text
    Appears within input when no value exists.

  • Prepend
    Adds a visual text element before the input.

  • Append
    Adds a visual text element after the input.

Storage and output

The Password field masks input only. It does not encrypt, hash or hide the value it stores:

  • get_field() and the_field() return the value as plain text, so any template or block that outputs it shows it to everyone who can view the page.
  • When the field group has Show in REST API enabled, the value is included in REST API responses for anyone who can view the object, which for a published post includes logged-out visitors.
  • Front-end forms created with acf_form() include the stored value in the input’s HTML.
  • The value is never included in structured data (JSON-LD) output.

Don’t use the Password field to store secrets such as credentials, API keys or access tokens. Store them outside custom fields instead, for example as constants in wp-config.php.

Template usage

Get value

Avoid outputting a Password field’s value on the front end unless it is meant to be public. More often, you’ll use the value in other code. The following example shows how to load the value of the field “password” from an ACF options page.

$value = get_field( 'password', 'option' );
Supercharge Your Website With Premium Features Using ACF PRO

Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.

Explore Features View Pricing

PRO Features
ACF Blocks
Options Pages
PRO Fields
Repeater
Flexible Content
Gallery
Clone

Related