Is there a way for <select> <option>s generated via the selectTag
helper method to be pre-selected in a multiple select list if they
exist in a join table? Sorry, that is a dense sentence, let me see if
I can explain.

I have two models, Product and Color. A product HABTM colors, and
colors HABTM products. On the edit product form, I am populating a
<select> element with the names of all available colors, and the color
names selected for the product at this form will be the colors
available to the user when they decide to purchase the product. For
example, if the administrator selects red, green and blue on Product
A's edit form, the end-user will have their choice of ordering the
product in one of those colors.

So here's my question again: If an admin has already selected colors
for Product A, and then returns to Product A's edit form, is there a
way for the select options that are already in the join table to
already be selected when the form loads?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to