E
E
EVOSandru62015-02-05 13:55:29
Yii
EVOSandru6, 2015-02-05 13:55:29

How to display the field name outside the form in Yii?

For example, I want to use the same names for the fields in the admin panel so that the code does not block, besides, everything is immediately multilingually translated there, I tried to do this thing without using forms: The model is loaded, but the output is for something " model " ((( Help with advice, how to get the names of the fields from the model?
<?echo CHtml::label('model','PRICE');?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krypt3r, 2015-02-05
@krypt3r

$model->getAttributeLabel('field')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question