Skip to content

Instantly share code, notes, and snippets.

@ash-f
Last active October 12, 2021 07:50
Show Gist options
  • Save ash-f/1c04ad292543f6a483bc0e05732d017a to your computer and use it in GitHub Desktop.
Save ash-f/1c04ad292543f6a483bc0e05732d017a to your computer and use it in GitHub Desktop.
WP Fluent Forms autocomplete prevention
// 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