Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Question #1</strong></p> <p>Change the decorators order and add an HtmlTag helper this way :</p> <pre><code>$decorate = array( array('ViewHelper'), array('Label', array('tag'=&gt;'div', 'separator'=&gt;' ')), array('HtmlTag', array('tag' =&gt; 'div')), array('Description'), array('Errors', array('class'=&gt;'error')), array('HtmlTag', array('tag' =&gt; 'li', 'class'=&gt;'element')) ); </code></pre> <p><strong>Question #2</strong></p> <p>Decorators are a chain, the output of each one is passed to the input of the next one, in order to be 'decorated' by it.</p> <p>By default, they append content (description, errors), prepend content (label..) and or wrap something around (HtmlTag). But these are default behaviors, and you can change it for most of them :</p> <pre><code>array('HtmlTag', array('tag' =&gt; 'span', placement=&gt;'APPEND')); //this would append &lt;span&gt;&lt;/span&gt; to the output of the previous decorator instead of wrapping it inside the &lt;span&gt; </code></pre> <p>Let's have a more closer look to what happens in your chain :</p> <ol> <li><p><code>ViewHelper</code> renders your form element using it's default viewHelper, declared in the form element's class.</p></li> <li><p><code>Label</code> prepends the label to the previous output</p></li> <li><p><code>HtmlTag</code> wraps a <code>&lt;div&gt;</code> around</p></li> <li><p><code>Description</code> appends the elements description</p></li> <li><p><code>Errors</code> appends error messages, if any</p></li> <li><p><code>HtmlTag</code> wraps all this in an <code>&lt;li&gt;</code></p></li> </ol> <p><strong>EDIT</strong></p> <p>I wrote this answer without testing anything, so there might be some little inaccuracies here and there. Dear reader, if you see some just drop a comment and i'll update.</p>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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