开发者

How can I get the description of a select multioptions tag in ZF?

How can I get the description of a select multioptions tag in ZF?

If I do this, then I recieve the value, but a want the de开发者_JS百科scription

$subjectTitle = $feedbackForm->getValue('subjecttitle');


Use the getDescription() method on the element, something like:

<?php
$form->getElement('element_name')->getDescription();

Edit: OK, after figuring out what you want, here's a possible solution:

<?php
$options = $form->getElement('my_select')->getMultiOptions();
// on form submition then do
$value = $form->getValue('my_select');
echo $options[$value];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜