Use of same form in several presenters – Form class not found
Notice: This thread is very old.
- coyot_
- Member | 12
Hello,
I'm trying to use one form class in several presenters. I've followed this guide: Use of same form in several presenters [CZ only]
I've created app/forms folder and put in my form class (called GameForm in GameForm.php file).
Its content (inspired by example on page from link above):
use Nette\Application\UI,
Nette\ComponentModel\IContainer;
class GameForm extends UI\Form
{
public function __construct(IContainer $parent = NULL, $name = NULL)
{
parent::__construct($parent, $name);
$form->addText('name', 'Název hry:');
$form->addTextarea('description', 'Popis hry:');
$form->addUpload('image', 'Obrázek:');
$form->addSubmit('login', 'Uložit');
}
}
In my presenter I call $form = new GameForm();
.
I'm getting error: “Class ‘GameForm’ not found”.
I tried to delete temp folder content and it didn't help.
Does anyone know, where could be the problem?
Could anyone provide me working example?
Last edited by coyot_ (2013-11-22 03:11)