See, because there's a potential for selecting the wrong "customer" on the
student form, that dropdown should really contain only one customer. Or that
dropdown shouldn't be shown at all. Or the scaffolding should be taken down.
Is there a way to get rid of the other customers in the dropdown without
taking down the scaffolding?

Thanks for the reply by the way!

On 4/17/07, Sonic Baker <[EMAIL PROTECTED]> wrote:
>
> If you just select the customer you want and save it the student will only
> be associated to that customer.
> If you want that customer to be already selected prior to going to the add
> student page, set the student id in the URL or session and edit the
> CustomersController::add() action to get the id from the relevant place.
>
> cheers,
>
> Sonic
>
> On 4/17/07, surge <[EMAIL PROTECTED]> wrote:
>
> >
> > Hi everybody,
> >
> > Let's say I have table "student" and "customer". A customer can have
> > many students and students are unique to a customer. The scaffolded
> > edit page of a student includes a dropdown of all customers --  I
> > included "customer" to the belongsTo relationship of the student model
> > -- and I want to limit it only to the customer that the student
> > belongs to.
> >
> > How do you do it in scaffolding?
> >
> > Hope there's a quick solution to this.
> >
> >
> > > >
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to