我使用 zend 表单和显示组,代码如下:
$profile=new Zend_Form_Element_Select('profile');
$profile->setLabel('name of profile');
foreach ($Current_User_Profile['profiles'][0] as $pro)
$profile->addMultiOption($pro,$pro);
$profile->setValue($Model_Port_Speed->Current_User_Profile($Current_User_Profile['my_user_id'], $Current_User_Profile['username']));
$Form_User_Settings->addDisplayGroup(array($profile), 'profile_change',array ('legend' => 'profile name here' ));
$profile_change = $Form_User_Settings->getDisplayGroup('profile_change');
$profile_change->setDecorators(array(
'FormElements',
'Fieldset',
array('HtmlTag',array('tag'=>'div','style'=>'width:100%;float:right;'))
));
我收到此错误:
没有为显示组指定有效元素
问题出在哪里?