var modform = new Backbone.Form({
//Schema
schema: {
id: 'Number',
name: 'Text',
password: 'Password'
},
//Data to populate the form with
data: {
id: 123,
name: 'Rod Kimble',
password: 'cool beans'
}
}).render();
var html = modform.$el.html();
console.log(html);
I get :
<fieldset data-fields=""> <div> <label for="id">Id</label> <div> <span data-editor=""><input id="id" name="id" type="number" step="any"></span> <div data-error=""></div> <div></div> </div> </div><div> <label for="name">Name</label> <div> <span data-editor=""><input id="name" name="name" type="text"></span> <div data-error=""></div> <div></div> </div> </div><div> <label for="password">Password</label> <div> <span data-editor=""><input id="password" name="password" type="password"></span> <div data-error=""></div> <div></div> </div> </div></fieldset>
None of the form elements gets values?
Any idea?
Thanks for your help