Changes
Title
unchanged
By Example: CHtml
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
listData, chtml, link, button, ByExample, ajax, ajax link, image
Content
changed
[...]
```php
<?php echo CHtml::textField('Text', 'some value',
array('disabled'=>'disabled'); ?>
```
***
**Example 5: Generating a hidden textfield**
```php
<?php echo CHtml::hiddenField('Text', 'some value',
array('id'=>'idTextField'); ?>
```
## CHtml::listData() method
~~~[...]
<?php echo CHtml::dropDownList('listname', $select,
$model->genderOptions,
array('empty' => '(Select a gender')
');
```[...]
echo CHtml::dropDownList('categories', $category,
$list,
array('empty' => '(Select a category')
');
```[...]
CHtml::listData(categories::model()->findAll("Status=1"),
'category_id', 'category_name'),
array('empty' => '(Select a category')
');
```[...]