gform_encrypt_password

Description

Allows basic encryption of the password field.

Usage

add_filter( 'gform_encrypt_password', 'your_function_name', 10, 3 );

Parameters

  • $encrypt_password bool

    Whether to encrypt the Password field with true or false. The default is false.

  • $field Field Object

    The field object.

  • $form Form Object

    The form object.

Examples

add_filter( 'gform_encrypt_password', '__return_true' );
add_filter( 'gform_encrypt_password', 'encrypt_password', 10, 3 );
function encrypt_password( $encrypt_password, $field, $form ){
if ( $form['id'] == 53 ){
$encrypt_password = true;
}
return $encrypt_password;
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms version 1.8.9.

Source Code

This filter is located in GF_Field_Password::get_value_save_entry() in class-gf-field-password.php.