I think this is related to ticket #4605: https://trac.cakephp.org/ticket/4605
On Oct 28, 8:38 am, zwobot <[EMAIL PROTECTED]> wrote: > Hello, > I am trying to make groups of radio buttons for a hasAndBelongsToMany > relation. > > The background: In my application I have following relations in for my > models: > > User hasAndBelongsToMany Workshop > Workshop belongsTo Event (Event hasMany Workshop) > Event belongsTo EventDay (EventDay hasMany Event) > > A User should be able to select exactly 1 Workshop in every EventDay, > therefore I want to use a group of radio buttons for each EventDay. I > don't think there is a "cake automagic" way to get this done so I'm > doing this in my View to get the HTML code for the radio buttons: > > http://bin.cakephp.org/view/1474966345 > > Which generates radio buttons like this: > > http://bin.cakephp.org/view/680986107 > > The data array which comes from the View's form basically looks okay, > however the IDs of the Workshops selected via the radio buttons are > not always stored properly in the array. > > [data] => Array > ( > [Workshop] => Array > ( > [Workshop] => Array > ( > [0] => > [1] => 3 > [2] => 5 > ) > ) > ) > > I don't know why certain Workshops are not saved properly in the data > array; I thought it had something to do with the order of the > Workshops' IDs - like if the radio button for Workshop with ID 4 comes > before the Workshop with ID 2 it is not saved in the data array. > However I was not able to verify this and have no clue how I should > work around this as the Workshops are sorted by their starting time > and not their IDs. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---