How do add bootstrap 3 validation states to input groups. The state seems to only apply to the input part of the group.
EDIT 10/02/2014: To clarify, I'm using an input group with a button:
<div class="form-group has-success col-md-3">
<label class="control-label"></label>
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</div>
http://bootply.com/112305
The trick is to place the actual input in its own block. Try the following:
<div class="form-group has-feedback">
<div class="input-group">
<div style="position:relative"><!-- sub container for the input and validation state -->
<input name="emailAddress" type="text" class="form-control" value="">
<span class="glyphicon glyphicon-remove form-control-feedback"><!----></span>
</div>
<span class="input-group-btn">
<button id="button-send" type="submit" class="btn btn-primary">Go!</button>
</span>
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With