Created
November 23, 2011 15:49
-
-
Save robwilkerson/1389021 to your computer and use it in GitHub Desktop.
CakePHP: Populate a dropdown with `optgroup` tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Populate the dropdown | |
$activities = $this->ActivityLog->Activity->find( | |
'all', | |
array( | |
'order' => array( 'Activity.display_order' ), | |
) | |
); | |
$activities = Set::combine( $activities, '{n}.Activity.id', '{n}.Activity.name', '{n}.Activity.type' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment