Difference between #46 and #49 of
By Example: CHtml

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
')');
```
[...]
79 0
74 followers
Viewed: 989 997 times
Version: 1.1
Category: Tutorials
Written by: jonah
Last updated by: glicious
Created on: Sep 25, 2009
Last updated: 8 years ago
Update Article

Revisions

View all history