也許有人知道。如何包裝Zend_Form_Element_Radio,包括整個無線電輸入堆棧的標籤(帶有輸入標籤)。在Zend_Form_Element_Radio中包裝標籤
public $radioDecorators = array(
'ViewHelper',
array('Description',array('tag'=>'div','class'=>'','placement' => 'prepend')),
array('Errors',array('class'=>'error_message_show','placement' => 'prepend')),
array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element')),
array('label', array('class'=>'label_text','placement' => 'prepend')),
array(array('rows' => 'HtmlTag'), array('tag' => 'div', 'class' => 'radio')),
);
$offer_type = new Zend_Form_Element_Radio('offer_type', array(
'label' => 'Label I'd like to wrap with inputs', //Label to wrap
'required' => true,
'description' => '',
'decorators' => $this->radioDecorators,
'multioptions' => array (
'standard' => 'standard',
'premium' => 'premium',
),
));
$this->addElement($offer_type);
上面的例子沒的解決我的,因爲它僅包裝幾個輸入標籤的。
你是什麼意思的包裝?你能提供一個你現在得到的html的例子,你想達到什麼目的? – Marcin 2011-03-13 23:20:19