Closed zeleznypa closed 6 years ago
Can you send whole code? or you can use setDefaults method
It is not about values
but about working with Container
.
For example, when you want to change caption of the generated inputs in container.
Or when you want to add specific form rules based on inserted parameters.
Usage:
$multiplier->onCreateComponents[] =[$this, 'loadParams'];
public function loadParams(Multiplier $multiplier) {
$params = [
'Parametr 1',
'Parametr 2',
'Parametr 3',
];
foreach ($params as $name) {
$container = $multiplier->addCopy();
$container['name']->caption = $name;
}
}
🙇
There is method
createOne
in Kdyby/FormsReplicator that allow to work with containers by your own.In our project there is something like:
There is method
addCopy
in WebChemistry/Multiplier that work almost same.But it is protected.
Will it be possible to make this method public by default?
Or,is there any other way for manually adding values in dynamic container and work with each one?