Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to decorate 'Errors' using standard decorators?
    primarykey
    data
    text
    <p>I have set the form decorators in this way: </p> <pre><code> &lt;?php $this-&gt;setElementDecorators(array( 'Label', array(array('labelTd' =&gt; 'HtmlTag'), array('tag' =&gt; 'td', 'class' =&gt; 'name')), array(array('elemTdOpen' =&gt; 'HtmlTag'), array('tag' =&gt; 'td', 'class' =&gt; 'form','openOnly' =&gt; true, 'placement' =&gt; 'append')), 'ViewHelper', 'Errors', array(array('elemTdClose' =&gt; 'HtmlTag'), array('tag' =&gt; 'td', 'closeOnly' =&gt; true, 'placement' =&gt; 'append')), array(array('row' =&gt; 'HtmlTag'), array('tag' =&gt; 'tr', 'class' =&gt; 'question')), )); $submit-&gt;setDecorators(array('ViewHelper', array(array('data' =&gt; 'HtmlTag'), array('tag' =&gt;'td', 'class'=&gt; 'element')), array(array('emptyrow' =&gt; 'HtmlTag'), array('tag' =&gt;'td', 'class'=&gt; 'element', 'placement' =&gt; 'PREPEND')), array(array('row' =&gt; 'HtmlTag'), array('tag' =&gt; 'tr')) )); $this-&gt;setDecorators(array( 'FormElements', array('HtmlTag', array('tag' =&gt; 'table', 'class' =&gt; 'simpleform')), 'Form' )); </code></pre> <p>It outputs a simple table</p> <pre><code>&lt;table class="simpleform"&gt; &lt;tbody&gt; &lt;tr class="question"&gt; &lt;td class="name"&gt; &lt;label class="required" for="email"&gt;Your email&lt;/label&gt; &lt;/td&gt; &lt;td class="form"&gt; &lt;input type="text" value="asasd" id="email" name="email"&gt; &lt;ul class="errors"&gt; &lt;li&gt;'asasd' is no valid email address in the basic format local-part@hostname &lt;/li&gt; &lt;li&gt;Information not found &lt;/li&gt; &lt;/ul&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="element"&gt;&lt;/td&gt; &lt;td class="element"&gt; &lt;input type="submit" value="Send" id="submit" name="submit"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>I would like to wrap ul.errors to TD and put it as the third cell. Like that:</p> <pre><code> &lt;tr class="question"&gt; &lt;td class="name"&gt; &lt;label class="required" for="email"&gt;Your email&lt;/label&gt; &lt;/td&gt; &lt;td class="form"&gt; &lt;input type="text" value="asasd" id="email" name="email"&gt; &lt;/td&gt; &lt;td&gt; &lt;ul class="errors"&gt; &lt;li&gt;'asasd' is no valid email address in the basic format local-part@hostname &lt;/li&gt; &lt;li&gt;Information not found &lt;/li&gt; &lt;/ul&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>and.. how to do that? :)</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.
 

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