Onclick on normal button is submitting form
When you use the <button>
element without specifying a type, it defaults to type="submit"
. You need to specify it as type="button"
to stop it submitting the form:
<button type="button" id="eCCC5" class="btn btn-default">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
If you have button with attribute type="submit"
, clicking on submit will send whole form. I think if you add attribute type="button"
or just delete it. Form probably won't send if you click on button or push ENTER
being in input.