2
我創建了一個複合表單,但問題是它不會將attribs發送到我的呈現表單。 Zend Framework:我的複合表單不傳遞表單
class My_View_Helper_NameElement extends Zend_View_Helper_FormElement { protected $xhtml = ''; public function nameElement($name, $value = null, $attribs= null) { $helper = new Zend_View_Helper_FormText(); $helper->setView($this->view); $this->xhtml .= $helper->formText($name . '[first_name]', '', array()); $this->xhtml .= $helper->formText($name . '[last_name]', '', array()); return $this->xhtml; } }setAttrib在下面的代碼不會發送類
$this->xhtml .= $helper->formText($name . '[first_name]', '', array(); $this->xhtml .= $helper->formText($name . '[last_name]', '', array());
當您回顯$ name時,您會看到什麼? – emaillenin 2011-12-16 12:42:26
我得到: '