Any thoughts ??
how about adding this function to your app_controller.php
function getSelectedItems ($data)
{
$return = array();
foreach ($data as $row)
{
$return[$row['id']] = $row['name'];
}
You're definitely right. thanks a lot. I should think about it every
time I see something recurrent in my code.
Jon Bennett wrote:
Any thoughts ??
how about adding this function to your app_controller.php
function getSelectedItems ($data)
{
$return = array();
foreach
Is there an elegant way to build the list of selected items to feed the $html-selectTag() in a HABTM relation ??I ended with for instance: $materials_selected_designations = array(); for($i=0; $i sizeof($this-params['data']['Material']); $i++){