4
我有幾種形式,唯一不同的是提交按鈕中的文本。
我試圖通過更改它的值來更改提交文本,但無濟於事。如何更改Zend_Form_Element_Submit的值
$form=getForm()//get a full Zend_Form object with elements.
$form->getElement('mySubmit')->setValue('new value');
....
....
$form->render(); //This will still put 'mySubmit' in the [submit] (var_dumping it shows the new value in the _value member, tried also with setAttrib();
這一個:
$form=getForm()//get a full with elements Zend_Form object.
$form->getElement('mySubmit')->setName('new value');
....
....
$form->render(); //This will still put 'newvalue' in the [submit] NO SPACES, no good :-(
tnx!非常直觀的屬性名稱:-) 仍然想知道爲什麼設置值不起作用,可能是一個錯誤? – 2009-05-09 17:34:33