Last active
October 12, 2021 07:50
-
-
Save ash-f/1c04ad292543f6a483bc0e05732d017a to your computer and use it in GitHub Desktop.
WP Fluent Forms autocomplete prevention
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change field_name to actual field name. | |
function ff_avoid_autocomplete( $data, $form ){ | |
if( $data['attributes']['name'] === 'field_name' ){ | |
$data['attributes']['autocomplete'] = 'new-password'; | |
} | |
return $data; | |
} | |
add_filter( 'fluentform_rendering_field_data_input_text', 'ff_avoid_autocomplete', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment