I'd like to hear some suggestions on this, too. What's the best way to
add and edit multiple HasMany or HABTM relations in one single webform?
I've got a similar app to what theman describes; I use Javascript
(jQuery!) with an "add another answer" button that creates duplicates
of a formfield. How should those fields be named ("QuestionAnswer[]"?),
and how should they be handled in my controller?
On Dec 22, 11:42 am, "theman" <[EMAIL PROTECTED]> wrote:
I have a scenario where I'm building a test which has questions which
then have answers. I want to be able to allow the user to create a
question (question add page) and also on that same page let them be
able to create their answers for this question. I think I have the
models associated correctly with Questions hasMany Answers and Answers
belongTo Questions.
What I'm wondering is if anyone has any ideas or suggestions on how I
can do this using Cake. What I've done previously (without cake) is
have a question add page with up to 8 (this is hardcoded) answers spots
available and on submit I create the question and get the key then only
create answer records for those out of the 8 that were filled out of
course using the master records (question) key. So now when using Cake
do I just make some dummy answer records to display on my question add
page? Then on submit cake should save everything properly because I
have the associations setup correctly? Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---