Skip to content
Block 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 (placeholder) - text shown when no value is entered. Empty by default
  • Characters Limit (characters_limit) - the maxlength put on the input, from 0 to 524288. Empty by default, which is 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?

Copyright © 2026 Lazy Blocks.