Fix form bootstrap template bugs

These should be final fixes to make form template bootstrap_tabs work correctly.