It is absolutely correct. At time when you are making another request to the App by Ajax the first instance has already finished, it’s gone. So, you have to recreate all needed objects by some data (ids) you are previously send from “parent” App instance.
You can of course store these “parent” objects somewhere (in db, session etc.) but all in all you would retrieve them only by another way.
how do I recreate it in this dynamically generated child view? I don’t want to create a new active form, I need to bind to the existing one and that I’m not sure how to do.
Or am I overly complicating things, and I simple redeclare it since I have the $model?
how do I recreate it in this dynamically generated child view?
Your dynamically created child view is in another application instance, created every time from scratch. If you need to show the form in it you can instantiate the form in partial view as usual and return it on ajax request.
I don’t want to create a new active form, I need to bind to the existing one and that I’m not sure how to do.
You have to create new active form instance for reasons mentioned above. But do not repeat yourself, place the form definition in some separate partial view file so you can include it in both in “parent” an “child” view.
Of course as the form from example is powered by some model you can load it first so your form will be prefilled with attributes values in child view.
If I create a new form, then when the parent form is submitted, will this one also be submitted? They are all part of the same ‘record’ and I need all the data handled upon the parent form’s submission.
Both your forms exist in two distinct, disconnected from each other app instances.
First form is send with the first request. With second request (probably POST) you save form values in database. With third one (AJAX) you create new form, probably by loading model from database first, so from the user’s perspective it is looks like it is “the same form”. Each request is completely new application instance, you are creating everything new.