Skip to content

Instantly share code, notes, and snippets.

@udibagas
Created April 9, 2013 14:59
Show Gist options
  • Save udibagas/5346397 to your computer and use it in GitHub Desktop.
Save udibagas/5346397 to your computer and use it in GitHub Desktop.
<?php $kelasArray = CHtml::listData(Kelas::model()->findAll(array(
'select' => 'kelas',
'group' => 'kelas',
'distinct' => true
)), 'kelas', 'kelas'); ?>
<?php echo $form->dropDownListRow($model, 'kelas', $kelasArray, array('empty' => '-- Pilih Kelas --', 'id' => 'kelas')); ?>
<script>
$('#kelas').change(function() {
if (this.val() == 6) {
// more code here
} else {
// more code here
}
});
</script>
@AIMAGU
Copy link

AIMAGU commented Apr 9, 2013

mantep sekali agan Bagas... Terima Kasih (y) (y) (y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment