Closed BigOHenry closed 6 years ago
Sorry for late response.
Do you have dev-master version? I think, last commit fixed this issue.
Np. Yes i have dev-master version:
"webchemistry/forms-multiplier": "@dev",
I try this code, but I can't reproduce the error
$form = new Nette\Application\UI\Form();
$form['multiplier'] = $multiplier = new Multiplier(function (Nette\Forms\Container $container) {
$container->addText('bar', 'Container 1');
});
$multiplier->addRemoveButton('Remove');
$multiplier->addCreateButton('Create');
$form['multiplier2'] = $multiplier = new Multiplier(function (Nette\Forms\Container $container) {
$container->addText('bar', 'Container 2');
});
$multiplier->addRemoveButton('Remove');
$multiplier->addCreateButton('Create');
$form['multiplier3'] = $multiplier = new Multiplier(function (Nette\Forms\Container $container) {
$container->addText('bar', 'Container 3');
});
$multiplier->addRemoveButton('Remove');
$multiplier->addCreateButton('Create');
$form->addSubmit('send');
$form->onSuccess[] = function ($form, array $values) {
Debugger::barDump($values);
};
return $form;
Can you try please version dev?
Hello. For example. I have 3 multipliers at one page (one form). All multipliers have 1 container by default. None of the containers has remove button (thats right). When i click on the add button on one of the multipliers, it will add and next container and it will add 1 remove button to the each container (thats right too) BUT also it will add remove buttons to all previous multipliers.
Example 1: default state:
I will click on add button on container1 of multiplier3 result is:
Example 2: default state:
I will click on add button on container1 of multiplier2 result is:
This is very interesting and i dont know what problem is. This behavor is only at empty inputs. When i use default values, everything is fine.
Any idea?
Thank you very much