contributte / forms-multiplier

:repeat: Form multiplier & replicator for Nette Framework
https://contributte.org/packages/contributte/forms-multiplier.html
MIT License
26 stars 21 forks source link

Form is not anchored and therefore can not determine whether it was submitted. #23

Closed BigOHenry closed 6 years ago

BigOHenry commented 6 years ago

Hello, i am using your hack to work with NasExt/DependentSelectBox (it was sloved here https://github.com/WebChemistry/forms-multiplier/issues/12 ), but with latest version i am getting this error again: Form is not anchored and therefore can not determine whether it was submitted. So probably its something broken. Can you help me please? The hack is this code:

$signalName = $this->getUniqueId() . '-' . $name . '-' . $groups->getName();
if (is_array($this->getPresenter()->getSignal()) && $this->getPresenter()->getSignal()[1] === 'load' && preg_match('#' . $signalName . '-([0-9]+)#', $this->getPresenter()->getSignal()[0], $matches)) {
    $groups->addCopy($matches[1]);
}
BigOHenry commented 6 years ago

Hello, any idea how to fix this please?

I get this error when i select value from select

MartkCz commented 6 years ago

which line in multiplier cause the error?

BigOHenry commented 6 years ago

2018-04-19 20_46_42-debian-test - vmware workstation 14 player non-commercial use only

Thank you very much for your reply :)

MartkCz commented 6 years ago

I fix only error in addCopy...

BigOHenry commented 6 years ago

Working, thank you very much :)