Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Why do you think there has to be a way?</p> <p>Did you have a look at the source code? The second one might be done using custom decorators. Have a read about that:</p> <p><a href="http://framework.zend.com/manual/1.10/en/learning.form.decorators.html" rel="nofollow noreferrer">http://framework.zend.com/manual/1.10/en/learning.form.decorators.html</a></p> <p><strong>More added after clarifying question:</strong></p> <p>I had a similar problem where I needed to add a preview button to each radio button. What I did was insert the complete html into the array passed to setMultiOptions. The list is dynamic. Each item on the list is defined elsewhere in the app and stored in the database. When defining these options, the user can specify to up load a file. This file forms part of the url in the a tag. Here is a bit of SQL to help explain what I mean:</p> <pre><code>function readAllObjlistitemPairpreview($id) { // get all objlistitem rows that belong to a certain list $id = (int)$id; $select = $this-&gt;getAdapter()-&gt;select()-&gt;from(array('li' =&gt; 'objlistitem'), array())-&gt;join(array('i' =&gt; 'objitem'), 'li.objitem = i.id', array('id' =&gt; 'li.objitem', 'name' =&gt; "CONCAT(i.name, ' &lt;a href=\"', i.url, '\"&gt;url&lt;/a&gt;')"))-&gt;where('li.objlist = ?', $id); //return $this-&gt;getAdapter()-&gt;fetchAll($select); return $this-&gt;getAdapter()-&gt;fetchPairs($select); } </code></pre> <p>You could do something similar with an img tag. The array that this function returns can be passed to setMultiOptions: $radio->setMultiOptions($array);</p> <p>HTH</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload