public function addField(FormField $field){

		$this->fields[]=$field;

		if($field->getName()==null){
			$field->setName('name_'.count($this->fields));
		}

		if($field->getId()==null){
			$field->setId('id_'.count($this->fields));
		}

		if($field instanceof FileField){
			$this->formTags['enctype']='multipart/form-data';
		}

	}