How to change the default error defragmenter tag in Zend_Form?

I am trying to change the Errors decorator tag, currently this is:

<ul class="errors">
  <li>error message</li>
</ul>

I would like to remove the wrapper <ul>and change <li>to ie <p>.

I tried a lot of things but can't get it to work.

Any ideas?

+5
source share
1 answer

You cannot change the default tags for Errors decorators because it invokes the Zend_View_Helper_FormErrorsdefault helper and you cannot pass parameters.

So you have to write your own Decorator and View helper.

I did something like wrapping errors on elements <label>

LabelledErrors, FormLabelledErrors reset , .

+3

All Articles