Hi all, I have a static ActiveForm to which I dynamically add multiple elements.
I have a "+" button that runs a method that returns data to be added to the form.
the function looks like this:
public function actionPalodzes($i)
{
$mod = new Palodzes();
echo Html::activeTextInput($mod,"[$i]platums",['style'=>'max-width:50px;']);
echo Html::activeTextInput($mod,"[$i]garums",['style'=>'max-width:50px;']);
/*
$form = new ActiveForm();
echo $form->field($mod, "[$i]platums")->textInput();
echo $form->field($mod, "[$i]garums")->textInput();
*/
}
Every time I try to get it working with ActiveForm (the commented out fields) it returns a new form and I just can’t find a way to add to the existing form.