Hello everyone!
I can't figure out what is CActiveForm->label() differs from CActiveForm->labelEx().
Could someone tell me the differences?
Thanks in advanced!
Hung
Page 1 of 1
Cactiveform Label Vs Labelex
#2
Posted 29 November 2012 - 08:22 AM
Hello,
In two words - labelEx adds '*' and special css class right to your label if attribute is required.
From http://www.yiiframew...LabelEx-detail:
In two words - labelEx adds '*' and special css class right to your label if attribute is required.
From http://www.yiiframew...LabelEx-detail:
Quote
"It will render additional CSS class and mark when the attribute is required. In particular, it calls CModel::isAttributeRequired to determine if the attribute is required. If so, it will add a CSS class CHtml::requiredCss to the label, and decorate the label with CHtml::beforeRequiredLabel and CHtml::afterRequiredLabel."
#3
Posted 05 December 2012 - 01:48 AM
LastDay, on 29 November 2012 - 08:22 AM, said:
Hello,
In two words - labelEx adds '*' and special css class right to your label if attribute is required.
From http://www.yiiframew...LabelEx-detail:
In two words - labelEx adds '*' and special css class right to your label if attribute is required.
From http://www.yiiframew...LabelEx-detail:
Thank you. I got it now.
Share this topic:
Page 1 of 1

Help











