I was trying to create a dynamic form field using the code from this site
http://bootsnipp.com/snippets/featured/dynamic-form-fields-add-amp-remove-bs3
Here is a piece of the code after I modify it
<div class="control-group" id="fields">
<div class="controls">
<form role="form" autocomplete="off">
<div class="entry input-group col-xs-3">
<input class="form-control" name="fields[]" type="text" placeholder="Type something" />
<span class="input-group-btn">
<button class="btn btn-success btn-add" type="button">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
<!--Submit Button-->
<div class="form-group">
<button type="submit" class="btn btn-default" >Search</button>
</div>
</form>
<br>
</div>
</div>
The problem is, whenever I press the add field button, the new field goes below the Search button. I guess this is because of div class="controls" before the form. How can I solve this so that the dynamic field is still added above the search?