Dropdown Listdata From Multiple Models

Hey guys

Trying to populate a dropdown with "peoplename - companyname" which the corresponding table id is store in an contact modal. e.g. Contact->companyid, Contact->Peopleid. And Company has company name, and people has their name. How can this be done?

Is the recommended way to use querybuilder? Or there is a better way? I can’t seem to find anything.

Cheers! thanks in advance.

Sorry guys, answered myself. end up using query builder to concat the fields together. :wink: Not sure if that’s the proper yii way though.