getting dynamic data

I want to send an email when registration process completes to that particular user.I know how to send,but my issue to get that email id from the registration form

When you submit the form and set the $user->attributes = $_POST[‘User’], you can access the email from the model itself, but also you can get it by Yii::app()->request->getParam(‘User’);, ‘User’ is a parameter array, email will be the named field value.

The above explanation assumes that your user model is named User and has a property field named ‘email’

Hope it helps

Thanks for ur reply,

I worked it in another way,i.e

before we save data we will be having $model->attributes=$_POST[‘Company’];

In that we can call $model->attributes[fieldname];

Now my issue is i am having company,users tables.I will enter id,pwd in company form and it will store in users table.but company table will not contain pwd feild.Now when i write pwd field explicitly in company form it showing error like "Property "Company.pwd" is not defined".

How can i add fields in a form which are not in db


Remember to title your post as SOLVED

Now i struck up here, i want extra field in form which is not in db,how to resolve this issue

Put the field whatever it is your form’s view:

<?php echo CHtml::inputField(‘text’,‘nameofthefield’);?>

In your controller



I am getting “Fatal error: Call to protected method CHtml::inputField() from context ‘CBaseController’ in D:\xampp\htdocs\OneViewCRM\protected\views\company\_form.php on line 36”

I have written

<?php echo CHtml::inputField(‘password’,‘passowrd’); ?>

for a password field use:


*** Note ***

this thread is not related to [b]Yii-powered application

[/b]@Roopa please pay attention to post in the right sub-forum

Thread moved to Genera Discussion for Yii 1.1.x