views:

79

answers:

1

HI,

I am trying to use custom decorators with Zend_Form. I created custom decorator and used teh following code

$form = new Zend_Form();
$form->addElementPrefixPath("Moon_Form_Decorator","Moon/Form/Decorator/","decorator");


$form->setAction("/question/index/ask-process")->setMethod("post"); 

$title = new Zend_Form_Element_Text('title');
$title->setRequired(true)->setDecorators(array("Test"));

$title->setAttrib("class","inputText");

$tag = new Zend_Form_Element_Text('tag');
$tag->setRequired(true)->setDecorators(array("ViewHelper","Errors"));
$tag->setAttrib("class","inputText");

$form->addElement($title);
$form->addElement($tag);



return $form;

if I use $form->addElementPrefixPath("Moon_Form_Decorator","Moon/Form/Decorator/","decorator");, my MVC simply display white blank page on FF, and "Internet Explorer cannot display the webpage" on IE.

What should I fix???

+1  A: 

Blank pages typically indicate a parse error. Do you have error reporting turned "up"? i.e.

error_reporting(E_STRICT);
Typeoneerror