I am following this fiddle http://jsfiddle.net/evilcelery/4XZMb/
$(function() {
//Use BootstrapModal for object List editor
Backbone.Form.editors.List.Modal.ModalAdapter = Backbone.BootstrapModal;
//Main model definition
var User = Backbone.Model.extend({
schema: {
title: { type: 'Select', options: ['', 'Mr', 'Mrs', 'Ms'] },
name: 'Text',
email: { validators: ['required', 'email'] },
birthday: 'Date',
password: 'Password',
notes: { type: 'List' },
weapons: { type: 'List', itemType: 'Object', subSchema: {
name: { validators: ['required'] },
number: 'Number'
}}
}
});
var user = new User({
title: 'Mr',
name: 'Sterling Archer',
email: 'sterling@isis.com',
birthday: new Date(1978, 6, 12),
password: 'dangerzone',
notes: [
'Buy new turtleneck',
'Call Woodhouse',
'Buy booze'
],
weapons: [
{ name: 'Uzi', number: 2 },
{ name: 'Shotgun', number: 1 }
]
});
//The form
var form = new Backbone.Form({
model: user
}).render();
//Add it to the page
$('body').append(form.el);
});
for my application. But however I am not able to view the Modal dialog view on clicking of the "Weapon" list. It shows properly in the fiddle, but when I try to do the same thing in my application, it does not include the modal dialog in my view. Can some one help me in this? Is there any special event handler required to add the Modal dialog view in my application?