I have seen many questions about adding an additional field to the HABTM,
yes, and all of them refer to using a select option and adding 1 field to a
1 select form. But that’s not at all what I am trying to do.
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
So since the form spits out all 20 checkboxes in a row (not the styling, the
code itself is checkbox, checkbox, checkbox........) I have to find a way to
add my new YEAR input inbetweeneach checkbox so it ends up checkbox year
repeat for each skill in the array
I am using 20 checkboxes in a form and need 20 additional input fields. 1
for each checkbox. User can select their skills from the checkbox list, "yes
im good at this this and this and they can enter in the years of experience
for each of the ones they have selected"
::: FORM :::
Skill1 [X] Years of Experience__25_____
Skill1 [] Years of Experience________
Skill1 [X] Years of Experience__10_____
Skill1 [] Years of Experience________
Skill1 [X] Years of Experience___5____
Skill1 [X] Years of Experience___4____
Skill1 [] Years of Experience________
::: END FORM :::
I have my fields andmy checkboxes created nw by looping thru a foreach but
the checkboxes are never populated. I tossed in dummy years to thedbso that
get pulled and displayed in the form when the user goes to edit but it’s the
checkboxes that neverhave any data inthem.
Debug ($this->data) and the checkbox data is there. Year is there.
That’s were I am stuck.
Getting the checkboxes that have data to be checked.
- Your question is answered in the docs
- Your question when googled finds an answer
Given what your saying, most of the above will be true.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of AD7six
Sent: December-21-09 5:09 AM
To: CakePHP
Subject: Re: 3 Days and not 1 person has any idea?
On 21 dic, 01:41, "Dave" <[email protected]> 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.
What question - why are you creating a new thread to apparently complain
about another thread.
If you don't get a response to a question consider the following:
- Your question isn't clear (in this case - where is/was it)
- Your question has been answered many times already
- Your question is answered in the docs
- Your question when googled finds an answer
Given what your saying, most of the above will be true.
Also bear in mind - it's a mailing list, you (apparently) asked over a
weekend, and it's close to xmas, all of which mean you need to be patient.
hth,
AD
PS Your blackmaily "nobody knows" technique isn't going to win you any
friends.
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
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 [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