dropDownList for user roles

Hi Guys,

I’m very new to yii, just trying to get the user roles working.

I added this to the _form.php file:


  <div class="row">

		<?php echo $form->labelEx($model,'role'); ?>

		<?php echo $form>dropDownList($model,'role','<option>test</option>',array('empty'=>'select Type')); ?>

		<?php echo $form->error($model,'role'); ?>

	</div>

and I get the following error:

Any ideas, or helpful links?

Cheers,

Paul

missing the obvious ->

Thanks Rohit. Can’t believe I missed that. It’s working now, I updated the code to this:


  <div class="row">

		<?php echo $form->labelEx($model,'role'); ?>

		<?php echo $form->dropDownList($model,'role',array('admin'=>'Admin', 'registered'=>'Registered'),array('empty'=>'select Type')); ?>

		<?php echo $form->error($model,'role'); ?>

	</div>