code: function() {
        var data    = this.elementToChange || {},
            fields  = this.container.querySelectorAll(SELECTOR_FIELDS),
            length  = fields.length,
            i       = 0;
  
        for (; i<length; i++) {
          data[fields[i].getAttribute(ATTRIBUTE_FIELDS)] = fields[i].value;
        }
        return data;
      }
docs: Grabs all fields in the dialog and puts them in key=>value style in an object which
  then gets returned