The Password field creates an input for providing a password using a masked field.
Screenshots
Settings
Required
Found on the Validation tab, this requires a valid password be provided as the input and 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.
Template usage
Get value
It’s unlikely you’re going to want to output password fields to the frontend, but rather 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.