I am trying to get a select form that has been passed an array, to
return an array. This is the array I am sending:
Array
(
[clan] => Array
(
[1] => Daeva
[2] => Gangrel
[3] => Mekhet
[4] => Nosferatu
[5] => Ventrue
)
[covenant] => Array
(
[2] => Carthian
[3] => Circle of the Crone
[4] => Invictus
[8] => Keepers of the Outlands
[5] => Lancea Sanctum
[9] => Legio Mortuum
[6] => Ordo Dracul
[7] => Shadows of Set
[1] => Unaligned
)
)
The view is meant to add records to a join table. And the records can
either have a clan_id or a covenant_id. I would like to only have one
select form since you cannot have both clan_id and covenant_id on that
record. I have made the select form return the selected id as
"join_id" and then will do some addtional manipulation before it is
saved, but I need to know which subtable was selected. Right now, I am
getting this back from the post.
[Reputations] => Array
(
[character_id] => 1
[user_id] => 1
[value] => 1
[join_id] => 3
[level] => 3
)
but would like this
[Reputations] => Array
(
[character_id] => 1
[user_id] => 1
[value] => 1
[join_id] => Array
(
[clan] => 3
)
[level] => 3
)
Is this possible?
My other idea was to add a set number to the second table just to make
the id's different than the first ie. add 1000 to the id's so all the
covenant id's would be 1001, 1002... and then use that to specify the
differences in table, but I would like the first idea to work as it is
less of a hack. Any suggestions? Thanks
~Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---