I am trying to modify the included bootstrap form template to show a submit button when a "submitbtn" flag is set in the templateData field.
The problem is the button is repeated on nested models (fields with schema type "NestedModel"), is there a way to check if the current form is nested with template markup?
Something like the following:
e.g.
/**
* Bootstrap templates for Backbone Forms
*/
Form.template = _.template('\
<div>\
<form class="form-horizontal" data-fieldsets>\
</form>\
<% if(submitbtn && !nestedModel) { %>\
<button class="btn btn-primary" id="createTagBtn">Submit</button>\
<% } %>\
</div>\
');
(Additionally because of this the current bootstrap templates generate nested <form> tags which are not valid html)