Hello, I'm stumbling through my first CakePHP project, and have hit a bit of a snag. The system that involves the following models:
Product hasMany Revisions Revision hasMany Answers Each answers is of type Question Answers can have supporting documents I have a form that will input one new product, one new revision of that product, about 70 answers, each corresponding to a question, and many documents supporting specific answers. I'm trying to work out how to differentiate the form data for one type of model compared to others when it comes time for the controller to process the input. From reading the $htmlHelper documentation it appears I can specify attribute names using "Modelname/fieldname", which will help to some degree. But using this approach won't help for the 70-odd answers the form may transmit, because this won't help identify which question the answer relates to. Similarly, I won't be able to tell which document supports which answer. One way to do this would be to replace 'fieldname' with something more meaningful, eg 'Answer/answer_text:question_id', or Document/ document_name:question_id and then process these values after the fact. This doesn't seem very elegant to me. Is there a better way of doing this? Have I got my models muddled? Am I trying to do something that Cake wasn't really designed for? Any help gratefully accepted. Thanks Stuart --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
