Paulson Peter
Paulson Peter

Reputation: 574

Yii model update form textfield displayes html encoded value

I am using the following code in my model form view.

echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200)); 

I have 'services & package' as value for the name field.When i take the update form, the value in the textfield displays as 'services & amp; packages'. Please help to resolve this issue.

Upvotes: 0

Views: 399

Answers (1)

Ali MasudianPour
Ali MasudianPour

Reputation: 14459

You can disable automatic html encoding by encode html option like below:

echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200,'encode'=>FALSE));

Upvotes: 1

Related Questions