requirement Stars aren't shown

hi,

these are my rules:



<?


	public function rules()


	{


		return array(


			// REGISTRIERUNG


			array('user, pwd, pwd_repeat, email, question, answer', 'required', 'on'=>'reg'),


			array('user', 'unique', 'on'=>'reg'),


			array('pwd', 'compare', 'on'=>'reg'),


?>


in the view, called reg.php i have some activeLabelEx's, but on the required labels aren't stars…

some words of advice?

You need to set CHtml::$scenario='reg' before the form.

thank you!!!

Qiang, do you think we should have a demo page where we show all the nice features hidden in CHtml by example? I feel, like i’m missing a lot of stuff (like the one above) here. :)

Yeah, that'll be really nice, but I'm short of time…

hey…

i set the senario like this, but its not working.

what is my mistake?



<?php


<div class="yiiForm">





<p>


Felder mit <span class="required">*</span> sind Pflichtfelder.


</p>


<?php CHtml::$scenario='reg'; ?>


<?php echo CHtml::form(); ?>





<?php echo CHtml::errorSummary($agenturen); ?>





<div class="simple">


<?php echo CHtml::activeLabelEx($agenturen,'email'); ?>


?>