![]() |
|
|||
|
Hey guys,
I've got a multipage form using zend_form, but I am having some problems with figuring out how to designate a view script from inside the form. As its a multipage form using subforms, the are all controlled by the index action and thus using index.phtml. However i need to upload photos in the second page so I am wanting the second form to render images.phtml, how do I do this? I've tried various things inside zend_form such as: [PHP] public function init() { $view = new Zend_View(); $view->addScriptPath(APPLICATION_PATH . '/modules/app/views/scripts/listing/'); $view->render('process.phtml'); $this->addElement('submit', 'btnNext', array( 'label' => 'Next')); } [/PHP] however it doesnt work, it simply continues to render index.phtml. Anyone have any suggestions? |
|
|||
|
Set the view script inside the form by using loadDefaultDecorators().
[PHP] public function init() { // add elements here } public function loadDefaultDecorators() { $this->setDecorators(array( array('ViewScript', array('viewScript' => 'process.phtml')) )); } [/PHP] |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Designed by: Miner Skinz |
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.1.0 |
![]() |