How to add autocomplete="off" to the form-element?

I have a problem with Google Chrome autocompleting email and password-fields when editing a resource and therefore overwriting the current value of the field. This is of course problematic. I have tried to disable autocomplete on the fields using ->autocomplete(false), but Google Chrome ignoreres this sattribute on the field. I have researched that I need to add autocomplete to the form-element, which is also what Laravel Nova does. I tried to add this to $form element inside the resource using ->extraAttributes, but these aren't added to the element. Any ideas how to disable autocomplete inside Google Chrome or how to add the autocomplete to the form-element?
No description
No description
1 Reply