Call to undefined method Nette\Application\UI\Multiplier::render()

Ajax
Member | 59
+
0
-

Hello to all!

I have presenter:

	protected function createComponentMaterialsForm() {
		$form = new \Nette\Application\UI\Form;
		$form->addText('count', 'Count');
		$form->addSubmit('send', 'Add');
		return $form;
	}

and template:

	{block viewContent}
		{control materialsForm}
	{/block}

Everything works. But when I use Multiplier:

	protected function createComponentMaterialsForm() {
		return new \Nette\Application\UI\Multiplier(function () {
			$form = new \Nette\Application\UI\Form;
			$form->addText('count', 'Count');

			$form->addSubmit('send', 'Add');
			return $form;
		});
	}

I'm getting Nette\MemberAccessException Call to undefined method Nette\Application\UI\Multiplier::render(). Can someone explain me why? Thanks…

nightfish
Member | 472
+
+1
-

In your template you this:

{control materialsForm-1}
{control materialsForm-2}
etc.

For more details (unfortunately only in Czech) see this article

EDIT: I have translated the Multiplier article to english

Last edited by nightfish (2017-07-14 09:14)