Cannot Update as secondary modal

I have a view that on it’s own works fine.

Clients Index → modal of the Client Update

But if I have the same view open as a 2nd modal

Project Index → modal of the Project Update → modal of the Client Update

it doesn’t work.

I think I’ve narrowed it down to the controller of the dynamic form

$oldNoteIds = ArrayHelper::map($modelsNotes, ‘NoteId’, ‘NoteId’);
$modelsNotes = Model::createMultipleNotes(ClientsNotes::class, $modelsNotes);
Model::loadMultiple($modelsNotes, Yii::$app->request->post());
$deletedNoteIds = array_diff($oldNoteIds, array_filter(ArrayHelper::map($modelsNotes, ‘NoteId’, ‘NoteId’)));

where I believe the

Model::loadMultiple($modelsNotes, Yii::$app->request->post());

doesn’t seem to populate with the new entry and return an error that the Note cannot be blank even though there is an entry on the web page and in the Yii::$app->request->post(), yet he $modelsNotes never seems to reflect that.

Would anyone have any guidance on the matter?

You can var_dump the models and see if they are not loaded. The ol’ good way

foreach($modelsNotes as $m){
    echo '<pre>';
    var_dump($m->attributes);
    echo '</pre>';
}
die;

but that’s what I’m saying.

The $model doesn’t include it, which is normal, but it is part of the post, yet Model::loadMultiple() doesn’t seem to add the post items.

Can you post relevant codes?

Calling Model::loadMultiple() subjects each load to $model->setAttributes(), the first thing I’d check is that the data you’re attempting to populate into the models are all valid / safe attributes set in your Model. At the very least you should also see what the return value of Model::loadMultiple(); it should be returning a boolean on whether or not at least one model got populated.