We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ahoj,
mam problem s replikatorom ked mam strukturu takuto:
$form->addDynamic('inputsContainer', function (Container $container) use ($translator, $addCallback) { $months = []; for ($m = 1; $m <= 12; $m++) { $months[] = date('F', mktime(0, 0, 0, $m, 1, date('Y'))); } $start = (new DateTime())->modify('-4 years'); $end = (new DateTime())->modify('+4 years'); $years = Date::getYearsBetweenInterval($start, $end); $container->addMultiSelect('months', $translator->translate('forms.kpi.createForm.months'), $months) ->getControlPrototype()->addClass('js-example-basic-multiple'); $container->addSelect('years', $translator->translate('forms.kpi.createForm.years'), $years); $container->addDynamic('inputs', function (Container $inputs) use ($translator) { $inputs->addText('targetName', $translator->translate('forms.kpi.createForm.labels.name')); $inputs->addText('interval', $translator->translate('forms.kpi.createForm.labels.interval')) ->setRequired(FALSE) ->addRule(Form::NUMERIC); $inputs->addText('color', $translator->translate('forms.kpi.createForm.labels.color')) ->getControlPrototype() ->addClass('colorpicker') ->setAttribute('autocomplete', 'off'); }, 6); $container->addSubmit('remove', 'Remove period') ->setValidationScope(FALSE) ->addRemoveOnClick(); }, 1)->addSubmit('add', 'Add period') ->setValidationScope(FALSE)->addCreateOnClick();
potrebujem ale, ked sa zavola addCallback(); aby sa zreplikoval aj container inputs - momentalne sa mi zreplikuje iba container inputsContainer
inputs
inputsContainer
vies mi nejako pomoct ?
Nette 2.4 replicator@dev
PS: Prva forma sa mi vykresli OK, so 6 prvkami
The text was updated successfully, but these errors were encountered:
Riesenie je:
$form->addDynamic('name', function(Container $name){}, $defaultContainers, TRUE);
cize posledny parameter na TRUE
Sorry, something went wrong.
No branches or pull requests
Ahoj,
mam problem s replikatorom ked mam strukturu takuto:
potrebujem ale, ked sa zavola addCallback(); aby sa zreplikoval aj container
inputs
- momentalne sa mi zreplikuje iba containerinputsContainer
vies mi nejako pomoct ?
Nette 2.4
replicator@dev
PS: Prva forma sa mi vykresli OK, so 6 prvkami
The text was updated successfully, but these errors were encountered: