Ok, I'll attempt to re-iterate what you are attempting to do, because
it is not completely clear to me:

1) You want to be able to 'add items to an apartment', where items <-
HABTM-> apartments.
2) This should be accomplished through an HTML select drop-down, which
would be populated with all the items contained within your items
table.
** The above point seems odd to me, since I'm guessing you would like
to have the ability to input many different items (of various
quantities) for each apartment.  This can also be accomplished, but
it's a question of what your design/architecture requires.

If this is anywhere near what you are attempting to accomplish, let me
know.  I just don't want to help you solve a problem you don't have.


-Joel.

P.S.
Something I noticed from your first post:  the most likely reason that
CakePHP couldn't find the 'inventory' table was that it wasn't
following the CakePHP conventions (which can be overrided, of
course).  If your table name was 'inventories', then the Inflector
would have been able to singularize the name, and find the
InventoryController, and the 'inventories' views..


On Jun 6, 2:36 am, winter <[EMAIL PROTECTED]> wrote:
> Thanks Joel,
>
> That sounds nice. I guess maybe I'm not being so clear and perhaps I
> am missing something.
>
> I'm trying to make a form to fill the join table. You see, a
> unit(apartment) has many items. For example Apartment A has 5 glasses
> and Apartment B has 10 glasses.
>
> Using plain PHP, I'd query my item table and use that data in a select
> element on my html form. The form would not allow you to set unit_id.
> I'd use a hidden field which is the value passed when clicking on a
> "add items to this apartment" link. When the form is submitted,
> unit_id, item_id, and amount are inserted into my inventory table.
>
> Now I have this join table, which seems like it's what I want. Though,
> perhaps it really isn't. Because I'm not sure if I can make a view for
> it according to cakephp convention.
>
> Cakephp seems to have many fantastic features for rapid app
> development. So I'd like to understand it. Things are becoming clearer
> after reading many blogs and docs. If you think there is something I
> should read, please point me to it.
>
> Thanks again!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to