Folks, I'm having some problems making a form render/display in my webpage. Well, it works fine in my local server, but once I use the same code in a remote server, the webpage displays fine, but the form is missing.
Localhost:
OS: Win 7
PHP: 5.3.8
Apache: 2.2.21
Zend: 1.11.3
Remote Server:
OS: Linux CentOS release 5.5
PHP: 5.3.8
Apache: 2.2.3
Zend: 1.11.3
FeedbackForm.php
class forms_FeedbackForm extends Zend_Form {
public function init() {
$this->setAction('')->setMethod('post')->setName('feedbackForm');
$feedback = new Zend_Form_Element_Textarea('feedback');
$submit = new Zend_Form_Element_Button('submitButton');
$this->addElement($feedback)->addElement($submit);
} }
IndexController.php
class IndexController extends Zend_Controller_Action {
public function indexAction() {
$form = new forms_FeedbackForm();
$this->view->form = $form;
} }
index.phtml
echo $this->form;
However, if I replace the echo statement with print_r($this->form), I see the object details with both servers.