code: function(availableFields) {
  		
  		this.nameIndex = {};
  		
  		var choices = [], i, field, fieldCopy, k, l;
  		
  		for (i = 0 , l = availableFields.length ; i < l ; i++) {
  			
  			field =  availableFields[i];
  			fieldCopy = {};
  			for (k in field) {
  				if (field.hasOwnProperty(k) && k != "label") {
  					fieldCopy[k] = field[k];
  				}
  			}
  			
  			this.nameIndex[field.name] = fieldCopy;
  			
  			choices.push({ value: field.name, label:field.label || field.name });
  			
  		}
  		
  		return { type: 'select', choices: choices };
  	}
docs: Generate