CreateForm that pull info&value from a search of another model


I’ve a little problem with yii 2. This is my case: I manage two tables, Customer and Order, and any Order has a Customer. I’ve created the relational data and the normal view to create, update, view and delete data from DB. Now i would use the search model of customer in the Order’s _form view (to create and update data) to select the customer and pull that i want to save in my order.id_customer.

With my solution i can see the gridview with customer search in the create view, but (with RadioColumn) it doesn’t return and when i try to filter the data the form doesn’t filter anything but it tries to submit my input in to the db.

The “_form”'s code is on pastebin:

Any suggestion?

Thank you!

After many hours of work i fixed my problem. Now my gridview is out from activeform, where i copy the radio’s returnament through a javascript function.