gform_encrypt_password

gform_encrypt_password

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
Allows basic encryption of the password field.
Usage
1add_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
1add_filter( 'gform_encrypt_password', '__return_true' );
1234567add_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.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注