Closed erikcw closed 11 years ago
+1
On 7 Jul 2013, at 23:18, erikcw wrote:
You should be able to define fieldsets (and the other options) by subclassing the form instead of just by passing options on initialization.
For example:
var UserForm = Backbone.Form.extend({ template: _.template($('#formTemplate').html()),
schema: { title: { type: 'Select', options: ['Mr', 'Mrs', 'Ms'] }, name: 'Text', email: { validators: ['required', 'email'] }, password: 'Password' }, fieldsets: { {legend: "my fieldset", fields: ["title", "name", "email", "password"]} }
}); The fieldsets object will be ignored when building the form. Each of the constructor options should also be available for setting a subclass default.
— Reply to this email directly or view it on GitHub.
Duplicate of #226
You should be able to define fieldsets (and the other options) by subclassing the form instead of just by passing options on initialization.
For example:
The
fieldsets
object will be ignored when building the form. Each of the constructor options should also be available for setting a subclass default.