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 description
$subjectTitle = $feedbackForm->getValue('subjecttitle');
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 description
$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];