Skip to content
Controls

Password

Password control provides a masked input field for entering sensitive text. The control uses the standard HTML password input type.

Password Control

This control only masks the input in the editor using <input type="password" />. It does not encrypt or provide additional security for the stored value.

Control Settings

  • Placeholder - Text shown when no value is entered
  • Characters Limit - Maximum number of characters allowed (leave blank for no limit)

Usage

PHP
<div>
  <?php echo esc_html( $attributes['control_name'] ); ?>
</div>
Handlebars
<div>
  {{control_name}}
</div>
Post Meta
<div>
  <?php echo esc_html( get_lzb_meta( 'control_meta_name' ) ); ?>
</div>

Consider using WordPress core functions like wp_hash_password() if you need to store passwords securely.

Was this article helpful?