views:

196

answers:

1

Hello,

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_CreateEventInformation();

Basically create a subform3 from the form CreateEventInformation.

A: 

Hi there, 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. :)

rvdavid