Sometimes a picture is worth a thousand words (or in this case, two pictures: one that you've gotten Cake to do properly, and the other a mockup of what you want, succinctly describing the difference).
The schemas of the models involved might help too (or at least of the fields that are involved). It sounds like what you're trying to do is possible, but when working with HABTM in Cake, some times there's a lot of trickery involved, it won't always just work in an easy manner. Example of why it's hard to understand what you're saying: "...since this code above gets created by cake there is no way..." "...what I have done is a foreach to manually create the code above..." Okay, so did Cake create the HTML you just posted, or did you? What code have you tried thus far (linked from your paste at http://bin.cakephp.org/)? What does your schema look like? If you can mock up an image or two to help define the problem and the optimal solution, that might also help. On Dec 21, 1:54 pm, "Dave" <[email protected]> wrote: > Ok please, please how can I describe this so people understand what the > problem is since no body is understanding the situation. > > When you have a HABTM and in the form you have input as multiple => checkbox > you end up with multiple checkboxes. > Those checkboxes are all spit out back to back or in a block (I am referring > to the code, not the look or style, the html is what I am talking about) so > you have > > <div class="options_select"><input name="data[Skill][Skill]" value="" > type="hidden"> > > <input name="data[Skill][Skill][]" value="9" id="SkillSkill9" > type="checkbox"><label for="SkillSkill9">some name</label> > <input name="data[Skill][Skill][]" value="10" id="SkillSkill10" > type="checkbox"><label for="SkillSkill10">some name</label> > <input name="data[Skill][Skill][]" checked="checked" value="7" > id="SkillSkill7" type="checkbox"><label for="SkillSkill7" > class="selected">some name</label> > <input name="data[Skill][Skill][]" value="4" id="SkillSkill4" > type="checkbox"><label for="SkillSkill4">some name</label> > <input name="data[Skill][Skill][]" checked="checked" value="5" > id="SkillSkill5" type="checkbox"><label for="SkillSkill5" > class="selected">some name</label> > <input name="data[Skill][Skill][]" value="3" id="SkillSkill3" > type="checkbox"><label for="SkillSkill3">some name</label> > <input name="data[Skill][Skill][]" checked="checked" value="2" > id="SkillSkill2" type="checkbox"><label for="SkillSkill2" > class="selected">some name</label> > <input name="data[Skill][Skill][]" value="6" id="SkillSkill6" > type="checkbox"><label for="SkillSkill6">some name</label> > <input name="data[Skill][Skill][]" value="1" id="SkillSkill1" > type="checkbox"><label for="SkillSkill1">some name</label> > <input name="data[Skill][Skill][]" checked="checked" value="8" > id="SkillSkill8" type="checkbox"><label for="SkillSkill8" > class="selected">some name</label> > <input name="data[Skill][Skill][]" value="11" id="SkillSkill11" > type="checkbox"><label for="SkillSkill11">some name</label> > </div> > > So now I need my additional field to be beside each checkbox. But since this > code above gets created by cake there is no way for me to get my additional > field to appear after EACH checkbox so what I have done is a foreach to > manually create the code above and insert my additional field after each > check box but the checkboxes are not populated. > > Anyways that's for your time I will figure it out onmy own. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Jon Bennett > Sent: December-21-09 8:37 AM > To: [email protected] > Subject: Re: 3 Days and not 1 person has any idea? > > Hi Dave, > > > 1 form, find->('list), list is array of Skills, $skills is a HABTM > > form for User to select thiere appropriate skills from, I added "year" > > to the HABTM > > Ahh, ok. What you want to be searching for is "saving extra data habtm join > cakephp", which is in the docs (only helps if you know what you're looking > for!). > > http://www.google.com/search?client=safari&rls=en&q=saving+additional... > n+habtm+join+cakephp&ie=UTF-8&oe=UTF-8 > > Cheers, > > Jon > > -- > jon bennett -www.jben.net- blog.jben.net > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > with their CakePHP related questions. > > 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 > cake-php+athttp://groups.google.com/group/cake-php?hl=en > No virus found in this incoming message. > Checked by AVG -www.avg.com > Version: 9.0.717 / Virus Database: 270.14.114/2575 - Release Date: 12/20/09 > 16:05:00 > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
