Saturday, April 3, 2010

How do I let a user pick associated records in my view

Up until now I've thrown together an app using scaffolding for the
admin screens, but now I'm working on replacing them with my own code
so I can put in some more logic and make the user friendly.

A common pattern I am coming across is I may have a model that belongs
to something or has many of something else. In the scaffolding code it
generates a form that has a select field that allows me to select
multiple values, or it has a drop down that lets me select one.

So I have 2 questions really.. how can I reproduce these in my code
and..... the alternative idea i had was have 2 lists with buttons in
between, the idea being you select one or more entries on the list on
the left side and press a button to move these to a list on the right
side?


Any advice welcomed otherwise I'm going to have to code up the 2 list
thing myself and then figure out how on earth to get this to submit in
a form that passes the data back to the controller in a way that I can
just call saveall..

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

No comments: