I have a text element declared this way:
$name = $this->createElement('text', 'name');
$name->setLabel('imie:');
I want to decorate this element to get it rendered like this:
<div class="row">
<span class="label">
<label for="name" class="highlight">Name</label>
</span>
<span class="formw">
<input type="text" id="someid" name="name" class="textfield">
</span>
</div>
I can’t manage to get it work properly.
Could somebody help me with setting decorators for that?
Use the viewScript Decorator:
the partial @ `views/scripts/_partial.phtml (name it what you want)
In your form set the decorator :
Now just render your form as usual
You may have to play with the element decorators to exactly what you want but this should get you close to your goal.
Hope this helps…