public function renderForm() { $this->fields_form = array('legend' => array('title' => $this->l('SQL query'), 'icon' => 'icon-cog'), 'input' => array(array('type' => 'text', 'label' => $this->l('SQL query name'), 'name' => 'name', 'size' => 103, 'required' => true), array('type' => 'textarea', 'label' => $this->l('SQL query'), 'name' => 'sql', 'cols' => 100, 'rows' => 10, 'required' => true)), 'submit' => array('title' => $this->l('Save'))); $request = new RequestSql(); $this->tpl_form_vars = array('tables' => $request->getTables()); return parent::renderForm(); }