开发者

Zend Framework call form as subform within a form

I am trying to call a form from within another form. I need it to come in as a subform. However, I cannot merely extend it as both forms extend different things that are required.

This is kind of what I was thinking but it doesn't work:

    $subForm3 = new Form_CreateEventInform开发者_如何学运维ation();

Basically create a subform3 from the form CreateEventInformation.


your question is a little little vague, but I'll answer what I can.

Calling a form within another form:

class Form_WhichNeedsCreateEventInformation
extends Form_BaseClass
{
 public function init()
 { 
  $this->addSubForm(new Form_CreateEventInformation(),'createEventInformationForm');
 }
}

class Form_CreateEventInformation
extends Form_BaseClass
{
 public function init()
 {
 }
}

I think this is what you're after, but it seems you've tried it already and mentioned that it doesn't work what doesn't work about it? ie What exactly is the problem?

If this is incorrect, please provide more information. So that I can aid you in a more effective manner. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜