« Return to Thread: removing surrounding div's on an Zend_Form element

removing surrounding div's on an Zend_Form element

by Joe Theplumber :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
I was wondering if there was a way to remove the surrounding div's on a text box form elment. I have the following code:

            $decorator=array(
                 'ViewHelper',
                 'Errors',
                 array('HtmlTag',),
                 array('Label',),
                );

            $name=new Zend_Form_Element_Text('name');
            $name->setRequired(true);
            $name->setDecorators($decorator);

but am still getting surrounding div's when outputting into an html based markup like:
        <td><strong>Name:</strong></td>
        <td><?=$this->form->name ?></td>

<div><input type="text" name="name" id="name" value=""></div>

For this it doesn't matter as much but the breaking behavior of <div>'s is cauing problems.

thanks

-jonathan

 « Return to Thread: removing surrounding div's on an Zend_Form element