I am adding dynamic form fields onChange of dropdown. Both types of fields are coming from different models and go to the database in different tables. I have already define
Its been a month so guessing this has been solved but for reference for others like me looking for the same and to save having to step thru the framework to find the answer perhaps try something like:
...
use yii\helpers\Json;
...
attributes as $attribute) {
$attribute = Json::htmlEncode($attribute);
$this->registerJs("jQuery('form').yiiActiveForm('add', $attribute);");
} ?>
...
Tested with regards to clientValidation and not with above question so have hacked my solution to hopefully answer above question.