php - How to render ZF2 form in view in ZF1 project -
I am trying to use ZF2 classes in the ZF2 project. I am following this link: I am an abstractionable I can use ZF2 classes to model models, table models from gateway to make table models.
I am getting an object on the controller. But when I try to render those form objects on the view (PHP), throwing this error, such as:
Fatal error: call the undefined method in / var / www / myproject / application / modules / tools / views in Zend \ Form \ Form :: openTag () / / script at /scripts/tablesample/add.phtml Here is the scene file:
& lt ;? Use Php Zend \ Form \ form form form; $ BaseUrl = $ this- & gt; Base url (); $ FormObject = new form (); // This form element is $$ form = $ this- & gt; Demo's print block is; $ Form- & gt; Set Attribute ('Action', $ baseUrl.tools / tablesample / add '); $ Form & gt; ready (); Counterfoil $ formObject- & gt; OpenTag ($ form); Echo $ the-> FormRow ($ form- & gt; get ('name')); Echo $ this-> Formo ($ form-> Mill ('Gender')); Echo $ this-> Formo ($ form-> Mill ('hobby')); Echo $ this-> Formaro ($ form-> receive ('email')); Sampling $ this- & gt; FormRow ($ form- & gt; get ('birth')); Counterpart $ the-> formRow ($ form- & gt; receive ('address')); Sampling $ this- & gt; FormRow ($ form- & gt; receive ('direction')); Echo $ the-> Form () - & gt; CloseTag (); ? & Gt; I think ZF1 is not detecting ZF2's form assistant or there may be another way of using the ZF2 form assistant in the ZF2 project.
How do I properly pursue this tutorial to create my ZF2 form form:
I need to confirm whether I have a ZF2 form in the ZF2 project Can I use or not? If this can be used, please show me the view file for this tutorial.
While I personally recommend 'integrating ZF2 into ZF1; From the ZF2 side of things, the error you are receiving is due to this line:
Comments
Post a Comment