View Categories

Field Type: Password

Table of Contents

A masked password input field for sensitive data like API keys, tokens, or credentials.

Example Usage #

sample-plugin.php
array(
	'id'          => 'api_key',
	'title'       => 'API Key',
	'desc'        => 'Your secure API key for authentication',
	'type'        => 'password',
	'placeholder' => '************',
	'value'       => get_option( 'api_key' ),
),

Properties #

  • id (required) – Unique identifier for the field
  • title (required) – Label displayed above the field
  • desc (optional) – Help text shown below the field
  • type (required) – Must be 'password'
  • placeholder (optional) – Placeholder text (typically asterisks)
  • value (optional) – Current saved value (will be masked in the UI)

Notes #

Values are masked with dots/asterisks in the interface but stored as plain text in the database. Consider using WordPress encryption functions for highly sensitive data.