34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
By Example: CHtml
Comparing
#46
with
#47
Revision #47 was created by
Rohit Suthar
on Nov 26, 2014, 9:16:27 AM.
add hidden field source code
« Previous (#46)
Next (#48) »
Content
[...]
```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
~~~
public static function listData($models,$valueField,$textField,$groupField='')
~~~
Generates data for dropDownList and listBox, using the format $key=>$value.
[...]