function addField($name, $type, $size = NULL, $opts = NULL)
{
$field_id = $this->FieldID($name);
// Set the field index so we know where we are
$this->current_field = $field_id;
// Set the field name (required)
$this->fields[$field_id]['NAME'] = $name;
// Set the field type (required)
$this->fields[$field_id]['TYPE'] = $type;
// Set the field size (optional)
if (isset($size)) {
$this->fields[$field_id]['SIZE'] = $size;
}
// Set the field options
if (isset($opts)) {
$this->fields[$field_id]['OPTS'][] = $opts;
}
}