Component 'multiplier_remover' is not attached to 'Nette\Forms\Form'
janholas opened this issue · comments
Jan Holas commented
When using manual rendering of forms with groups and iterating over groups, I am getting InvalidStateException: Component 'multiplier_remover' is not attached to 'Nette\Forms\Form'
...
$form->addGroup("TEST");
$multi = $form->addMultiplier("multi", function(\Nette\Forms\Container $container, \Nette\Application\UI\Form $form) {
$container->addText("a", "A");
}, 1);
$multi->addCreateButton("Add");
$multi->addRemoveButton("Remove");
....
Latte:
{form testForm}
{foreach $form->getGroups() as $groupName => $group}
{foreach $group->getControls() as $name => $input}
{input $input}
{/foreach}
{/foreach}
{/form}
This error doesn't happen when the form is rendered automatically or you itarate right over $form->getControls()
MartkCz commented
Sorry for late response. Thank you for issue