code: function(title, sections, values, options) {
              if (!_.isArray(sections)) sections = [sections];
  
              var fields = _.reduce(sections, function(prev, value) { return _.merge(prev, value); }, {});
  
              return Dialogs.open(null, _.defaults(options || {}, {
                  "title": title,
                  "sections": sections,
                  "values": values || {},
                  "dialog": "fields",
                  "autoFocus": true,
                  "valueSelector": function(that) {
                      var data = {};
  
                      var selectors = {
                          'text': function(el) { return el.val(); },
                          'password': function(el) { return el.val(); },
                          'textarea': function(el) { return el.val(); },
                          'number': function(el) { return el.val(); },
                          'select': function(el) { return el.val(); },
                          'checkbox': function(el) { return el.is(":checked"); },
                          'action': function(el)  { return null; }
                      };
  
                      _.each(fields, function(field, key) {
                          var v = selectors[field.type](that.$("*[name='"+ key+"']"));
                          if (v !== null) data[key] = v;
                      });
                      return data;
                  }
              }));
          }
docs: Open a form modal dialog with different field inputs
  
  @param {object} fields map of fields (standard with settings fields)