sách gpt4 ai đã đi

zend-form - 在 Zend Form 中装饰单选按钮

In lại 作者:行者123 更新时间:2023-12-04 06:30:23 26 4
mua khóa gpt4 Nike

我有一个来自数据库的单选按钮列表。我想把它们每个都放在一个单独的“td”中。我所做的是:

foreach ($notificationTypes as $key => $value) {
$radios->removeDecorator('DtDdWrapper');
$radios->removeDecorator('HtmlTag');
$radios->addMultiOption($value, $value . "_" . $i);

}
$radios->setDecorators($this->elementDecorators);
$this->addElement($radios);

这是我的装饰者:
abstract class Myprj_Form_Abstract extends Zend_Form {

protected $elementDecorators = array(
'ViewHelper',
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'right_columns')),
array('Label', array('tag' => 'td')),
array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
);
}

但是,我得到的是,所有单选按钮都位于一个 td 中。我知道我可以在 View 中执行它,但我想将它们执行到表单中。有人知道怎么做吗?

非常感谢

1 Câu trả lời

我找到了答案,所以我要分享它......

我只需要添加

$radios->setSeperator('');

容易,嗯?

干杯,

关于zend-form - 在 Zend Form 中装饰单选按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5496065/

26 4 0
Bài viết được đề xuất: 人类的 opengl 旋转
Bài viết được đề xuất: sql - PLS-00306 : wrong number or types of arguments in call to '*'
Bài viết được đề xuất: ionic-framework - 电容.settings.gradle' 因为它不存在
Bài viết được đề xuất: jsf-2 - 素面 p :ajaxStatus for non ajax requests
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com