Hello,
I've been trying to get a Zend_Form working with Smarty too. I followed your suggestion and added a viewhelper to the view object.
PHP Code:
/* Initiate Smarty */
$view = new Zend_View_Smarty(dirname(__FILE__).'/views', $smarty_config);
/* Setup a helper for Zend_Form and such */
$viewHelper = new Zend_Controller_Action_Helper_ViewRenderer($view);
$viewHelper -> setViewSuffix('html');
Zend_Controller_Action_HelperBroker::addHelper($viewHelper);
/* Register Smarty */
Zend_Registry::set('smarty', $view);
Unfortunately, PHP comes up with this:
Code:
Fatal error: Call to undefined method Zend_View_Smarty::formText() in /library/Zend/Form/Decorator/ViewHelper.php on line 247
I've been trying several things to fix it, but I haven't found a solution yet. Does anyone have a suggestion?
Thanks in advance.