. if (!defined('EG')) die('Direct access not allowed!'); //create the HTML of the whole form class Form_Form { public $entry = array(); //associative array containing the entries of the form (objects that inherit the class form_entryModel). Each element of the array corresponds to one field of the table public $action = null; //the action of the form public $name = null; //the name of the form public $className = 'formClass'; //the class of the form public $id = null; public $submit = array(); //the submit entries array('name'=>'value') public $method = 'POST'; //the transmission method: POST/GET public $enctype = null; //enctype attribute of the form public function __construct($action,$submit = array('generalAction'=>'save'),$method = 'POST',$enctype = null) { $this->action = $action; //action of the form: controller/action $this->submit = $submit; $this->method = $method; $this->enctype = $enctype; } //method to manage the $this->entry associative array //entryType: the type of the object to be initialized, $entryName: the name of the entry //$options: the list of options (if the entry is a \n\n"; } $htmlForm .= "\n"; return $htmlForm; } }