Yep, adding field is in case it contains data-editor on the top level. 

It's unlikely but it could be that you'd want multiple editors in a field e.g. If rendering a birthday field with 3 selects.

On 20 Mar 2013, at 20:47, Phil Freo <notifications@github.com> wrote:

> In src/field.js:
> 
> > +
> > +    //Render field
> > +    var $field = $(this.template(_.result(this, 'templateData')));
> > +
> > +    if (schema.fieldClass) $field.addClass(schema.fieldClass);
> > +    if (schema.fieldAttrs) $field.attr(schema.fieldAttrs);
> > +
> > +    //Render editor
> > +    $field.find('[data-editor]').add($field).each(function(i, el) {
> > +      var $container = $(el),
> > +          selection = $container.attr('data-editor');
> > +
> > +      if (_.isUndefined(selection)) return;
> > +
> > +      $container.append(editor.render().el);
> > +    });
> in what case would you actually want to render more than one data-editor?
> and is the idea of the add($field) that the top level Field itself might just be a data-editor itself?
> 
> —
> Reply to this email directly or view it on GitHub.