> The output of $companies in my view shows the correct data, but I've no > clue how to create the input fields. Can I use the HtmlHelper for this > or do I have to create them "manually"?
Do you mean the input fields for your tables or the join table ? You can indeed use the html helper, like this: <tr> <td>Name</td> </td> <?=$html->input('Company/name')?> <?=$html->tagErrorMsg('Missing or invalid name')?> </td> </tr> As for views and the join table: You need to create an add() action/method in the join table model. I use some javascript to set the href/target of something like: (i'm using AJAX and autocomplete and the works) <?=$html->link( 'Add', '/companiesMembers/add/ array('id'=>'joinhabtm', 'onClick'=>'return(goAddHABTM())') )?> This could however be done differently, with a second form or something. That all depends on how you implement the add() of your join table model. There's nothing special about the join table model. Your actions/methods also get a $this->data with the submitted form data. Nothing stops you from adding a second form to your view and POSTing that data to the join controller: (hmm this is just throwing stuff together as i'm doing this way different but it might point you and others in the right direction) <?=$html->formTag('/companiesMembers/add')?> <?=$html->hiddenTag('Company/id')?> <?=$html->selectTag('Member/Member', $members)?> <?=$html->submit('Add it');?> </form> Your controller should set $members from the model with e.g.: $this->set('members', $this->Members->generateList()); HTH, Albert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---