Zend framework 向Zend Dojo表单添加自定义dijit元素

Zend framework 向Zend Dojo表单添加自定义dijit元素,zend-framework,zend-form,dojo,zend-form-element,Zend Framework,Zend Form,Dojo,Zend Form Element,我想使用未包含在Zend框架中的Dijit元素。但我不知道我该怎么做: $subPrice = new Zend_Dojo_Form_SubForm('priceTab'); $subPrice->setLegend('Tarification :'); $sign = new Zend_Dojo_Form_Decorator_DijitElement('sign'); $sign->setDijitParams(array('dojoType' => 'dijit.form

我想使用未包含在Zend框架中的Dijit元素。但我不知道我该怎么做:

$subPrice = new Zend_Dojo_Form_SubForm('priceTab');
$subPrice->setLegend('Tarification :');

$sign = new Zend_Dojo_Form_Decorator_DijitElement('sign');
$sign->setDijitParams(array('dojoType' => 'dijit.form.ToggleButton',
                    'label'     =>  '-',
                    'showLabel' =>  true,
                    'checked'   =>  true,
                    'onChange'  =>  'toggleLabel(val)'
                                ));
$subPrice->addElement($sign);
在我看来,我只是添加了
dojo.require(“dijit.form.Button”)

但是,我从
addElement
函数中得到此错误消息:

致命错误:对D:\www\tuto\library\Zend\Form.php第1055行的非对象调用成员函数getOrder()

任何帮助都将不胜感激


谢谢

那么getOrder()函数呢?Jerec:你知道如何制作togglebutton元素了吗?我也希望如此。@Fatmuemoo不,我在输入前加了一个图像(+/-),并设置了
onClick=toggleSign()
,以便js函数更改图像容器的类以显示减号而不是加号,并添加了一个布尔隐藏输入以知道使用了哪个符号