A controller for multiple models

I have a register form in my project who uses a lot of columns, from different tables beyond the database, and some of this columns uses other columns from other tables.

Example:

createUser (form)

 -> (uses the follow tables) [b]address[/b] / wishList / contact / xpto... 


 -> (The [b]adress[/b] table have some foreign keys... and these keys are...) [b]city / state[/b]

i’m using this kind of structure for the reason that the two tables are for the system and nobody can manipulate, but can see the result…

in the case of the other tables are just for include more informations and transform the system i something a little bit more faster…

my question is…

->How can i made this kind of relations in my project???

->In case of Address, the user just need to put the zipcode to find part of his address, the rest the user needs to put… (number, complement…) in this time, have some function in php or we will enter in javascript mode???

i found some definitions but wasn’t clear enough about this…

Someone can help me???

Thanks a Lot…

For the first issue you’ll need to specify relations in your User model.

See: http://www.yiiframework.com/doc/guide/1.1/en/database.arr

For the second bit, Yii includes a autocomplete widget which will do all the work for you, including the javascript.

See: http://www.yiiframework.com/wiki/162/a-simple-action-for-cjuiautocomplete/

this is makes use of jQuery UI autocomplete.

understood, now i can go ahead! many many many thanks! ow my situation is with masks who can’t have connections with models, but this situations i’ll put in another topic! many thanks again!!!

If I may drop an organisational line, off-topic…

@Loloanjinho: Please, take a closer look, where you’re posting your questions! This forum is for discussion about Yii Framework website, not about technical questions on coding or framework itself. Not only, you’re introducing a little bit mess, but also you’re lowering chances, that someone sees your question and answer.

Moved to 1.1