Custom Form With Parts Linked To Other Model

Hi,

i’m madding a form that does not represent a database table but it contains a part “mapped” to a database table (like a belong_to relation).

So you can consider a contact form in which you can choose to whom send the email with a dropdown list that represent users in database.

And below you can type your email subject and content.

So here the contact form is not stored in the database, so it is not an ActiveRecord instance, but it contains "relation" like an ActiveRecord has.

My question is : How do i build my form class ?

I want to be able to do this in the view :

$activeFormWidget->dropdown($form->user, ‘name’, User::model()->getUsers());

Thanks