Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyForm extends Nette\Application\AppForm
- {
- public function __construct(Nette\ComponentContainer $parent, $name)
- {
- parent::__construct($parent, $name);
- $this->addText(...
- $this->addSelect(...
- $form->addSubmit(...
- }
- }
- // ...
- protected function createComponentMyForm($name)
- {
- return new MyForm();
- }
- ####### ... nebo containery
- class MyContainer extends Nette\Forms\FormContainer
- {
- public function __construct()
- {
- parent::__construct();
- $this->addText(...
- $this->addSelect(...
- }
- }
- // ...
- protected function createComponentMyForm($name)
- {
- $form = new Nette\Application\AppForm($this, $name);
- $form['neco'] = new MyContainer;
- $form->addSubmit(...
- }
Advertisement
Add Comment
Please, Sign In to add comment