HTML

jdh
jdh
12,334 Points

Bootstrap Select Option Default Value

How can I set a default value on a bootstrap select option?

I want the option Total Points to be selected on default.

          <select ng-model='discussionsSelect' class='form-control'>
            <option value='total'>Total Points</option>
            <option value='created'>Created</option>
            <option value='read'>Read</option>
            <option value='replied'>Replied</option>
          </select>

Thanks!

1 Answer

James Alker
James Alker
8,554 Points

You could try using the 'selected' attribute to have Total Points selected on page load:

<option value='total' selected>Total Points</option>