Hi,
This was a dilemma when creating a honeypot solution. But in my testing, the off
attribute was less effecting than nope
.
Anyway, you can change it with the following filter. Just make sure that you add some conditions and check if the field attribute exists.
field-0
is the first first in the form. If you are changing the second one, you have to increment the number.
add_filter(
'bricks/element/render_attributes', function ( $attributes, $key, $element ) {
$attributes['field-0']['autocomplete'] = 'off';
return $attributes;
}, 10, 3
);
Let me know if you need more help.
Additionally, can you tell me how you tested, so that form was autocompleted?
Thanks,
Matej