A big thanks!

$test = new Zend_Form_Element_Radio('test');
$test->setAttrib('label_style', '');

Works perfectly!

Noé

On Wed, Mar 19, 2008 at 2:08 PM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]> wrote:
> -- Noé Froidevaux <[EMAIL PROTECTED]> wrote
>  (on Wednesday, 19 March 2008, 10:52 AM +0100):
>
>
> > I have a small problem. I have a form with radio buttons.
>  > By default, the label have the CSS style "white-space: nowrap;".
>  >
>  > The line "$label_attribs = array('style' => 'white-space: nowrap;');"
>  > in the file Zend/View/Helper/FormRadio.php do this.
>  >
>  > How can I change/remove this?
>
>  Add a 'label_style' attribute to your element:
>
>     $element->label_style = '';
>
>     // or, when creating the element:
>     $element = new Zend_Form_Element_Radio('foo', array(
>         'label_style' => '',
>         // ...
>     ));
>
>     // or, in your config:
>     elements.foo.options.label_style = ""
>
>  --
>  Matthew Weier O'Phinney
>  PHP Developer            | [EMAIL PROTECTED]
>  Zend - The PHP Company   | http://www.zend.com/
>

Reply via email to