MudTextField How do I prevent autofill?

106 Views Asked by At

I have two MudTextFields that are getting autofilled from the browser password store. Neither of the fields have anything to do with login. How can I prevent ANY form of autofill for both of them?

This is what I get: enter image description here

Here are the field definitions:

<MudTextField @bind-Value="CompanyName" Label="Firma" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="EncryptionSecret" Label="Krypteringsnøkkel" Variant="Variant.Text" InputType="InputType.Password" />
1

There are 1 best solutions below

0
On BEST ANSWER

I figured it out:

autocomplete="new-email" and autocomplete="new-password" both work.

<MudTextField @bind-Value="CompanyName" Label="Firma" Variant="Variant.Text" autocomplete="new-email"></MudTextField>

<MudTextField @bind-Value="EncryptionSecret" Label="Krypteringsnøkkel" Variant="Variant.Text" InputType="InputType.Password" autocomplete="new-password" />