How do I access a backbone-form from within another form or view object?

41 views
Skip to first unread message

David Pennington

unread,
Nov 14, 2013, 1:42:54 PM11/14/13
to backbon...@googlegroups.com
I have a custom form editor

Form.editors.Hierarchy = Form.Editor.extend({
        tagName: 'div',
});


which I am using in another form.editor

Product.View.ProductForm = Form.extend({
      , schema: {
          category:     {type: 'List', itemType: 'Hierarchy', title: 'Category', subSchema : {
                title: 'Category',
            }}
        }
       , clickSave: function(e) {
            e.preventDefault();

                      // Where is the Form.editors.List editor instance that has my
                      // custom "Form.editors.Hierarchy" editor instances? 
            console.log(this);
            
            var errors = this.commit();
            this.trigger('save', this.model, errors);
        }
        ....
});

By the way, this is rendering my multiple "Hierarchy" editor objects just fine in a list, in my form.


Reply all
Reply to author
Forward
0 new messages