When a user adds an Event, I want them to be able to choose which band(s) are playing at that event. I already have my Events table and my Bands table each with HABTM model associations to the other.
On my "add event" page, I have a dropdown displaying the bands, so they can choose one.
echo $this->Form->input('Band', array('multiple'=>false, 'empty'=>true));
I would like to have a "add another band" button, and when clicked, it adds another dropdown. I think I already know how to do the dynamic field-adding thing - but - even when I try this like this: (just to see if I can get it to work)
echo $this->Form->input('Band', array('multiple'=>false, 'empty'=>true));
echo $this->Form->input('Band', array('multiple'=>false, 'empty'=>true));
echo $this->Form->input('Band', array('multiple'=>false, 'empty'=>true));
It doesn't save three rows in the bands_events HABTM table - it just saves one. And when I try to edit the event, all three select dropdowns default-select one of previously selected bands, but not all (obviously it can't, since it didn't save the data).
Any thoughts on how I can have multiple dropdowns to add more than one band to an event? There are way too many bands to have checkboxes - and I hate the multi-select boxes - too difficult for most users.
Any help is GREATLY appreciated.