InPlaceCollectionEditor custom key
Hi all,
I have a problem, since I don't know how to pass an array to ajax-
>editor() with the collection options. I need to pass my data in order
to have <options> with a certain value (the key of my array) and a
label (the value of my array).
In the ajax manual I read
For explicit value attributes, use a two dimensional array for the
collection where the second dimension is a key value pair such as
[['key', 'value'], ['key', 'value']].
In my particular case, the array is composed by professional cycling
teams for a given year.
The data is in the format, for example:
$teams[2009][345] = 'Liquigas'
I want to show only Liquigas, and the option value to be 345.
Passing
'collection' => $teams[$i]
to the $ajax->editor() function does not work: when I click on the
editable field, it just disappears.
The source of the web page seems correct:
collection:{"474":"Acqua Sapone","467":"Agritubel"[...]}
--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home