Skip to content

Instantly share code, notes, and snippets.

@alber70g
Last active December 14, 2015 20:08
Show Gist options
  • Save alber70g/5141268 to your computer and use it in GitHub Desktop.
Save alber70g/5141268 to your computer and use it in GitHub Desktop.
<?php
$modelPersoonHasStdTaak = PersoonHasStdTaak::model()->findByPk(array('idPersoon' => 5, 'idPlanning' => 5, 'idStdActiviteit' => 4, 'idStdTaak' => 7));
echo $this->widget('editable.EditableField', array(
'type' => 'select',
'model' => $modelPersoonHasStdTaak,
'attribute' => 'idPersoon0', // idPersoon0 is the attribute to show (i think). At least thats what I can see on the page
'url' => $this->createUrl('persoonhasstdtaak/updatepersoonhasstdtaak'),
'source' => CHtml::listData(Persoon::model()->findAll(), 'idPersoon', 'Naam'),
'placement' => 'right',
), true);
?>
// the above code results in
John Doe
// Without underlined to edit or something.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment