Open adriano-di-giovanni opened 10 years ago
I post my solution. I think it can be useful to someone else.
First, override Backbone.Form.template
Backbone.Form.template = _.template('\
<form data-fieldsets <% if (id) { %>id="<%= id %>"<% } %>></form>\
');
Second, use templateData
attribute in the options hash
var
AddEditTraineeForm = Backbone.Form.extend({
templateData: {
id: 'addEditTraineeForm'
}
});
Despite Backbone.Form is a Backbone.View, I can't get the form id attribute set if I pass the id attribute to the options hash.
Thanks for backbone-forms, Adriano