I\'m trying to stay on a specif tab ( in this case tab2 ) but after clicking the submit button the tab reverts to tab 1 which has the default class of active. I have hit a b
It's so easy.
after submit your form you have to click on tab you want automatically.
first put Id in your tabs like this
<a href='#tab1' id=idtab1 >
<a href='#tab2' id=idtab2 >
and after that just use the Javascript before body close
<script>
document.getElementById('idtab2').click();
</script>
You can specify tab in URL. A tab is an anchor in a URL like: yourURL/#tab
<form id="form2" action="#tab2" method="post">
</form>