0

I'm using Yii-user and I want to add a Country Profile Field to the user profile.

Based on this example : http://code.google.com/p/yii-user/wiki/FieldWidget#Example_-_Country_list

I've added this line:

'profiles'=>array(self::HAS_MANY, 'Profile', 'country_id'),

to the relations array of my Country class.

and I've added the relation to Profile model.

But I don't understand how should I fill the Widget parameters field in JSON string format.

Can someone give me an example?

Shani1351
  • 509
  • 4
  • 10
  • 25
  • check here for accessing relation values if that is your main issue : http://stackoverflow.com/a/14157371/724913 – arkoak Jan 04 '13 at 12:43
  • Thanks, but my issue is the JSON string I need to set as Widget parameters. Right now I get an error : Fatal error: Class '' not found in .../yii-1.1.12.b600af/framework/db/ar/CActiveRecord.php on line 387 – Shani1351 Jan 04 '13 at 13:17

0 Answers0