docs: function(region) {
              // Get form data.
              var serializeFormField = function(array) {
                  var sarr = [];
  
                  var i = 0;
                  for (i=0; i<array.length;i++) {
                      var a = array[i];
                      var o = {};
                      o.name = a.name;
                      o.value = a.value;
                      o.type = a.type;
                      if (a.type === "checkbox") {
                          o.value = (a.checked) ? "on" : "off";
                      }
                      sarr.push(o);
                  }
                  return sarr;
              };
  
              var n = serializeFormField(document.querySelectorAll(region + " > input"));
  
              var data = (n).reduce(function(obj, field) {
                  switch (field.type) {
                  case 'number':
                      if (field.value !== "") {
                          obj[field.name] = parseFloat(field.value); // for fields that are numbers.
                      }
                      break;
  
                  case 'checkbox':
                      obj[field.name] = (field.value === 'on') ? true : false; // for checkboxes.
                      break;
  
                  default:
                      obj[field.name] = field.value; // default for fields that are text.
                      break;
                  }
  
                  return obj;
              }, {});
  
              return data;
          }