Reputation: 51
I'm trying to change the tag of the Errors decorator, currently it's:
<ul class="errors">
<li>error message</li>
</ul>
I'd like to remove the <ul>
wrapper and change the <li>
by ie <p>
.
I tried a lot of things, but can't get it to work..
Any ideas?
Upvotes: 5
Views: 851
Reputation: 47614
You can't change the default tags of the Errors decorators because it calls the default views helper Zend_View_Helper_FormErrors
and you've no way to pass paramaters.
So you'll to write your own Decorator & View Helper.
I did something similar to wrap errors into <label>
elements
I created LabelledErrors
decorator which calls a FormLabelledErrors
helper and reset the default decorators, replacing the Errors decorator by my own.
Upvotes: 3