Note that there are some explanatory texts on larger screens.

plurals
  1. POOverride Separator on Zend_Form Radio Elements When Using a ViewScript Decorator
    primarykey
    data
    text
    <p>I am using ViewScripts to decorate my form elements. With radio elements, the separator can normally be overridden, but the override is being ignored when I use the ViewScript.</p> <p>When I use the below call and ViewScript, the radio elements are separated by a '&lt;br /&gt;' rather than the space I've specified. If leave the default decorators, the override works.</p> <pre><code>$this-&gt;addElement('radio', 'active', array( 'disableLoadDefaultDecorators' =&gt; true, 'decorators' =&gt; array(array('ViewScript', array('viewScript' =&gt; 'form/multi.phtml'))), 'label' =&gt; 'Active', 'required' =&gt; true, 'multiOptions' =&gt; array('1' =&gt; 'Yes', '0' =&gt; 'No',), 'value' =&gt; '1', 'separator' =&gt; ' ', 'filters' =&gt; array(), 'validators' =&gt; array(), )); </code></pre> <p>ViewScript:</p> <pre><code>&lt;div class="field &lt;?php echo strtolower(end(explode('_',$this-&gt;element-&gt;getType()))) ?&gt;&lt;?php if($this-&gt;element-&gt;hasErrors()): ?&gt; errors&lt;?php endif; ?&gt;" id="field_&lt;?php echo $this-&gt;element-&gt;getId(); ?&gt;"&gt; &lt;?php if (0 &lt; strlen($this-&gt;element-&gt;getLabel())): ?&gt; &lt;?php echo $this-&gt;formLabel($this-&gt;element-&gt;getName(), $this-&gt;element-&gt;getLabel());?&gt; &lt;?php endif; ?&gt; &lt;span class="value"&gt;&lt;?php echo $this-&gt;{$this-&gt;element-&gt;helper}( $this-&gt;element-&gt;getName(), $this-&gt;element-&gt;getValue(), $this-&gt;element-&gt;getAttribs(), $this-&gt;element-&gt;getMultiOptions() ); ?&gt;&lt;/span&gt; &lt;?php if ($this-&gt;element-&gt;hasErrors()): ?&gt; &lt;?php echo $this-&gt;formErrors($this-&gt;element-&gt;getMessages()); ?&gt; &lt;?php endif; ?&gt; &lt;?php if (0 &lt; strlen($this-&gt;element-&gt;getDescription())): ?&gt; &lt;span class="hint"&gt;&lt;?php echo $this-&gt;element-&gt;getDescription(); ?&gt;&lt;/span&gt; &lt;?php endif; ?&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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