Red *
is adding according to your validators definition in your model. you have two options.
First in your model add On => 'scenario name'
for required validator
for the property you want. so you can control the behavior of yii-booster components because they only apply those rules which matches the scenario
of the model. for example:
array('password_repeat', 'required', 'on'=>'register'),
It will show Red *
only in register
scenario (if you set it via $model->setScenario('register');
) and in normal times no red *
will shown.
Another option for you is when you are creating the form element based on the property marked required
by validator rules in model, you can prevent that *
from showing but this way will not ignore that validation rule
and if you try to submit the form while this form field is empty you will get error from yii (because you just solve showing but in background you have your required validator). for this method, you only need to provide label
in your yii-booster
form element:
<?php echo $form->textFieldGroup($model,'textField',
array(
'wrapperHtmlOptions' => array(
'class' => 'col-sm-5',
),
'hint' => 'In addition to freeform text, any HTML5 text-based input appears like so.',
>>>>> 'label' => 'Your new value for label which will have no red *',
)
); ?>