Yup, that works, thanks!
Now I have a radio group with 15 elements each on a new line - how do I
place into 4 cols? Decorator?
Also, how do I set the default option?
thx
Mike Roetgers wrote:
>
> Mike Rötgers schrieb:
>> nolner schrieb:
>>> (I also seemed to me that I should be able to pass concrete elements
>>> into
>>> addDisplayGroup - simply for consistency with addElements - as used in
>>> the
>>> tutorials I've seen)
>>>
>>> But, my question is related: I'm simply trying to create a radio group
>>> in a
>>> fieldset (displayGrouup) - but having no joy. In fact I can't seem to
>>> add
>>> anything to a displayGroup - getting: No valid elements specified for
>>> display group - even for text fields (using 1.6rc2)
>>>
>>> Heres the code from my form constructor:
>>> $rad = new Zend_Form_Element_Radio('foo', array(
>>> 'multiOptions' => array(
>>> 'foo' => 'Foo Option',
>>> 'bar' => 'Bar Option')
>>> ));
>>> $this->addDisplayGroup(array('foo'), 'failure',array ( 'legend'
>>> =>
>>> 'Contact Form '));
>>>
>>> Anything obviously wrong?
>>
>> You have to add the form element to the form before you can add it to a
>> display group.
>>
>> $rad = new Zend_Form_Element_Radio('foo', array(
>> 'multiOptions' => array(
>> 'foo' => 'Foo Option',
>> 'bar' => 'Bar Option')
>> ));
>> $this->addElement($rad);
>> $form->addDisplayGroup($rad, 'failure',array(
>> 'legend' => 'Contact Form '
>> ));
>
> Sorry, made a mistake. It's of course
>
> $rad = new Zend_Form_Element_Radio('foo', array(
> 'multiOptions' => array(
> 'foo' => 'Foo Option',
> 'bar' => 'Bar Option')
> ));
> $this->addElement($rad);
> $form->addDisplayGroup(array('foo'), 'failure',array(
> 'legend' => 'Contact Form '
> ));
>
>
>>
>> Kind regards
>> Mike
>>
>>
>
>
>
> --
> Mike Rötgers
> http://www.roetgers.org
>
>
--
View this message in context:
http://www.nabble.com/Zend_Form-feature-request%3A-display-group-elements-tp15101453p19060813.html
Sent from the Zend Framework mailing list archive at Nabble.com.