drnysdnnb2909701
2009-08-23 23:20
浏览 68
已采纳

Zend_Form显示组问题

Here is a short snippet from my class extending Zend_Form:

$this->addElements(array(
    $inputField1,
    $inputField2,
    $inputField3,
    $submitButton
));

$this->addDisplayGroup(array('inputField1',
                             'inputField2',
                             'inputField3',
                             'submitButton'),
                       'fieldset1',
                       array('legend' => 'Lorem Ipsum'));

The problem is when I print the form, it prints only the submit button, the fieldset with input fields (those are ordinary Zend_Form_Element_Text elements) isn't there.

EDIT: If I remove the $this->addDisplayGroup() (or comment it), the text elements are displayed without a problem.

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duankui6150 2009-08-24 00:44
    已采纳

    Sounds like you aren't using the getDisplayGroup() in your controller or later on in the form init() method

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题