I am trying to place a login form in a Bootstrap 3 navbar. I am trying to make the username and password input boxes into input groups. I know a similar question has been asked and answered here before, but none of the solutions work because I need two input groups in a single form.
This is what I have so far:
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle" data-target="#navbar-collapse" data-toggle="collapse" type="button">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><a class="navbar-brand" href="/">My Site</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<form action="/login" class="navbar-form navbar-right" method="post" role="form">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-user"></i>
</span>
<input class="form-control" name="andrew_id" placeholder="Andrew ID" type="text" />
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-lock"></i>
</span>
<input class="form-control" name="secret" placeholder="Secret Words" type="password" />
</div>
</div>
<button class="btn btn-primary" type="submit">Log In</button>
</form>
</div>
</div>
</div>
Also in a JSFiddle: http://jsfiddle.net/x6hk4/
Pretty much the two inputs and the button should be right aligned and be inline with the rest of the navbar.