Yii Framework Forum: Dropdown Listdata From Multiple Models - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dropdown Listdata From Multiple Models Rate Topic: -----

#1 User is offline   jasocl 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 08-March 12

Posted 10 October 2012 - 10:06 PM

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.
0

#2 User is offline   jasocl 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 08-March 12

Posted 10 October 2012 - 10:27 PM

View Postjasocl, on 10 October 2012 - 10:06 PM, said:

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. ;-) Not sure if that's the proper yii way though.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users