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

Revision #47 has been created by Rohit Suthar on Nov 26, 2014, 9:16:27 AM with the memo:

add hidden field source code
« previous (#46) next (#48) »

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

~~~
public static function listData($models,$valueField,$textField,$groupField='')
~~~
Generates data for dropDownList and listBox, using the format $key=>$value.
[...]
79 0
74 followers
Viewed: 989 965 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