Kdyby / FormsReplicator

Other
30 stars 57 forks source link

Container in container issue #5

Closed alesculek closed 11 years ago

alesculek commented 11 years ago

If you have addDynamic inside of next addDynamic everything works. Until you try to replicate outer container - issue is that inner has zero instace.

fprochazka commented 11 years ago
$form->addDynamic('users', function (Nette\Forms\Container $user) {
    $user->addDynamic('addresses', function (Nette\Forms\Container $address) {
        $address->...;
    }, 1, TRUE); // default 1, enforce it
}, 1, TRUE); // 1 means create default count, TRUE means enforce it
alesculek commented 11 years ago

Again thank you. I missed that parameter. Maybe it would be great to mention that on addons.nette.org (with issue #4).

fprochazka commented 11 years ago

I will do that as soon as possible :)