code: function ( fields ) {
  
              var field, data = {}, key, value;
  
              for ( var i = fields.length - 1; i >= 0; i-- ) {
  
                  field = fields[ i ];
  
                  field.removeAttribute( 'name' );
                  key = field.getAttribute( this.fieldNameAttribute );
                  value = field.value;
  
                  // Cater for select boxes
                  if ( field.options && typeof field.selectedIndex !== "undefined" ) {
                      value = field.options[ field.selectedIndex ].value;
                  }
  
                  data[ key ] = value;
  
              }
              
              return data;
  
          }
docs: /*
  Creates JSON object
  
  @param fields {Array} An array of fields to convert to JSON.
  
  @return data {JSON} The data as JavaScript Object Notation