Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Which shold be the basic code to extend Userforms?


Reply

3 Posts   1171 Views

Avatar
ShaggyStyle

11 February 2010 at 1:33pm (Last edited: 11 February 2010 1:34pm), Community Member, 7 Posts

I need to have different templates for diferent userforms... so the only way that I see is extending the userdefinedform class...

As I see the next code is not enought.

<?php
class UserDefinedFormTienda extends UserDefinedForm {

}

class UserDefinedFormTienda_Controller extends Page_Controller {

   }

}
?>

Any idea please?

Avatar
banal

11 February 2010 at 8:23pm Community Member, 901 Posts

Hi

It should be

<?php
class UserDefinedFormTienda extends UserDefinedForm {

}

class UserDefinedFormTienda_Controller extends UserDefinedForm_Controller {

}

In addition you had a spare closing bracket at the bottom of your code...

After creating the file, don't forget to run dev/build

Avatar
ShaggyStyle

12 February 2010 at 4:35am Community Member, 7 Posts

What a fool of me!!! I didn't noticed this detail. Thanks a lot