I have form with submit button. Once user clicks on Submit I would like to show the message like Record Successfully saved
next to the button. Here is example of my form:
<form name="frm_myaccount" id="frm_myaccount" class="frm-Submit" autocomplete="off">
<div class="form-group required">
<label class="control-label" for="answer">Answer</label>
<input type="text" class="form-control" name="frm_answer" id="frm_answer" placeholder="Enter Answer" maxlength="100" required>
</div>
<div>
<div class="col-xs-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
<div class="col-xs-10">
<div id="myaccount-message" class="alert"></div>
</div>
</div>
</form>
Code above moved Submit button outside of the form grid. I'm wondering if there is any class that is used inside of the form to group elements together in the same grid?
It's still inside of form grid, but just got margin of
15px
Problem is
You gave your
button
classcol-*-2
, which gave itmargin:15px
Solution
col-*-2
from your 2ndform-group
inline-block
.alert