I am working on a small php application using the Zend Framework, I have used the Here is my form class: This is my IndexController.php This is my I get the output instead of the form Why is that so? What's wrong with my code? Please help me. Firstly try Charu If this works, then you have to disable the short tag by using it Zend_Form Has created a form using, but when I try to display it in the browser, it is not working properly.
category IndexForm Extends Zend_Form {public function init ()) {$ this- & gt; SetAction ('main / main'); $ This- & gt; SetMethod ('post'); $ Username = $ this- & gt; AddElement ('text', 'uname', array ('filter' = & gt; array ('string trim', 'stringsolver'), 'validated' => array ('alpha', array ('string lamp' False, array (3,20)),), 'expected' = true, 'label' = & gt; 'username:')); Add ('password', 'pwd', array ('filter' => array ('string' '),' assumptions' => array ('alnum', array ('string lang', false, array) 6, 20)),), 'required' => true, 'label' = & gt; 'password:')); $ Login = $ this- & gt; AddElement ('submit', 'login', array ('required' = & gt; wrong, 'ignore' = & gt; true, 'label' = & gt; 'login',)); }}? & Gt;
index.phtml , where I need to display the form.
& lt; Html & gt; & Lt; Style & gt; & Lt; / Style & gt; K & lt; Body & gt; & Lt; Br> & Lt; Img alt = "" src = "http: //localhost/Accounts/application/views/scripts/images/logo.png" width = 200px height = 80px> & Lt ;! - See if you can get the host name Dynamic - & gt; & Lt; Div id = "text" & gt; & Lt; H1 & gt; Welcome to & lt; / H1> & Lt; Br> & Lt; Hour & gt; & Lt; H4 & gt; Please login to view the main page & lt; / H4 & gt; & Lt; / Div & gt; & Lt ;? = $ This- & gt; & Gt; form; & Lt ;! - I want to display the form here - & gt; & Lt; Div & gt; & Lt ;? Php contains APPLICATION_PATH. '/ Visual / script / layout / footer.' & Gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
form?
& lt ;? Php echo $ this- & gt; Form? & Gt;
short_open_tag = 1;
Comments
Post a Comment