Created
November 28, 2018 12:01
-
-
Save markusvonplunkett/6c22f63a50b1a908eda722c138713003 to your computer and use it in GitHub Desktop.
Remove autocomplete from data form fields
This file contains 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
add_filter( 'gform_field_content', function($input, $field, $value, $lead_id, $form_id){ | |
if($field->type == 'date'){ | |
$input = preg_replace( '/<(input)/', '<${1} autocomplete="off" ', $input ); | |
} | |
return $input; | |
}, 5, 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment