I understand. But as to our reply; The problem is not multiple checkboxes themselves. That I have,
I have added an additional field to my HABTM, so where I have currently have my multiple checkboxes, instead if display them as cake spits them out in a chunk of checkbox checkbox...... I need to add my additional input field between each checkbox. $selections is the list of select checkbox options to choose from then the year input to add their years of experience. <?php foreach ($selections as $key => $name) { echo $form->checkbox('Skill.Skill.', array('id' => 'SkillSkill'.$key, 'value' => $key)); echo $form->input('Skill.Skill.' .$key. '.year', array('label' => 'Years Experience:', 'class' => 'text')); } ?> So on a form it would be: checkbox and then my newly added field to my HABTM checkbox and then my newly added field to my HABTM checkbox and then my newly added field to my HABTM And so on. Not checkbox, checkbox, checkbox Field field field Its not the styling of the checkboxes. I need loop thru each of the $list an manually create a checkbox element and my field since there is no way get my additional field for every checkbox But the checkboxes are never filled. I have dummydata in the db and another form to reference the code from. That’s what I was asking help with. Re-populationfg the checkbox data Thanks Dave -----Original Message----- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of mike karthauser Sent: December-21-09 5:16 AM To: cake-php@googlegroups.com Subject: Re: multiple checkboxes / was 3 Days and not 1 person has any idea? Hi Dave two things On 21 Dec 2009, at 00:41, Dave wrote: > I have been struggling with the idea of simply adding a input field to for every select box produced from a HABTM find('list) and tried everything I can think of and nothing. > > The closest was doing a foreach loop thru the $list to create checkbox and input for each. I can get the checkboxes to generate the exact code produced by cake but then nothing is selected. Tried dropping the HABTM idea and going with the hasMany belongsTo ideas as mentioned in the cookbook and that was a disaster. I am just stumped to the fact that that not 1 person has any ideas! The guys who wrote the entire cake code, the contributors, the community. I have stumped everyone? > > Maybe I will edit the form helper and create my own custom $form->addCheckfield method which will add the input automatically for every checkbox, but who knows. I just thought it was a simple idea that maybe someone has come across or even had an idea to do, but by the lack of response to the question i guess not 1 singlebaker in the community as large a this has ever toyed with the idea. two things. firstly your answer <?php echo $form->input('ModelName',array('label'=>'label','type'=>'select', 'multiple'=>'checkbox')); ?> Adding multiple checkbox to your input array will provide checkboxes where you might have had a multiple select. secondly - I appreciate you have a problem but you can't blame list subscribers for not giving you an answer. Especially if you post it on a friday. I cant imagine many people have been following this list over the weekend instead they are christmas shopping and getting merry. In the future, also ensure your subject is relevant. '3 days and not 1 person has any idea' doesn't describe a problem that anyone reading email titles would look at. Searching for 'cakephp multiple checkbox' on google found this result on the first page http://stackoverflow.com/questions/1267230/cakephp-form-helper-habtm-multipl e-checkbox-styling You'd also have found the answer in book.cakephp.org http://book.cakephp.org/view/193/options-multiple merry xmas mikek -- Mike Karthäuser Managing Director - Brightstorm Ltd Email: mi...@brightstorm.co.uk Web: http://www.brightstorm.co.uk Tel: 07939 252144 Address: 1 Brewery Court, North Street, Bristol, BS3 1JS 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group cake-php+at http://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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en