Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use autocomplete with radio buttons?

Tags:

I am going through the bootstrap 4 documentation. What purpose does it do to set the autocomplete tag to off? Is this something needed for bootstrap, or is it just good practice?

<div class="btn-group btn-group-toggle" data-toggle="buttons">
  <label class="btn btn-secondary active">
    <input type="radio" name="options" id="option1" autocomplete="off" 
checked> Active
  </label>
</div>
like image 623
smilingfrog Avatar asked May 24 '19 21:05

smilingfrog


People also ask

What is the use of autocomplete off?

The autocomplete attribute specifies whether a form should have autocomplete on or off. When autocomplete is on, the browser automatically complete values based on values that the user has entered before. Tip: It is possible to have autocomplete "on" for the form, and "off" for specific input fields, or vice versa.

Why do we use radio buttons?

Radio buttons allow the user to select one option from a set. You should use radio buttons for optional sets that are mutually exclusive if you think that the user needs to see all available options side-by-side.

What is required autocomplete?

The autocomplete attribute specifies whether or not an input field should have autocomplete enabled. Autocomplete allows the browser to predict the value. When a user starts to type in a field, the browser should display options to fill in the field, based on earlier typed values.

What is autocomplete in HTML?

The HTML autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field.


1 Answers

Unlike other browsers, Firefox by default persists the dynamic checked state of an <input> across page loads. Use the autocomplete attribute to control this feature.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio

like image 131
dontangg Avatar answered Nov 15 '22 06:11

dontangg