This is an EER diagram of my database design (is small, don't be
afraid to look) http://citizensforsocialjustice.com/wiki/images/design.jpg

I am trying to write action create in the organizations controller.
Since an organization has and belongs to many keywords, I am
displaying all the keywords with checkboxes. All the rest of the data
is done correctly (all the other fields, including the association
with users) but when I try to use $this->data to save the keywords
that need to be added to that organization the checked keywords are
not passed. Is probably because I am setting it wrong in my view:

<p>
        Keywords association:
        <?php print_r($keywords) ?>
        <?php foreach($keywords as $keyword){
                echo $html->checkbox('Keyword/id', $keyword['Keyword']
['id']) . $keyword['Keyword']['name'];
        }
        ?>
        <?php echo $html->tagErrorMsg('Keyword/id', 'Needs to be an
ID.') ?>
    </p>

The $keywords array is ok (this code actually displays the right
visual combination of check boxes and names).  What am I doing wrong,
how can I save this habtm association?

Thanks in advance for your help.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to