I keep my struggle to learn the cake "way" (not carlitos' way). Please
suppose I have the following
in my add view ORDERS
echo $form->input('item_id');
which returns the field name in a select due to the association, and
is working fine, where item_id is my foreign key.
bellow on the same view...
echo $form->input('value');
I would like cake to ONCHANGE event ($form->input('item_id');)
suggest a value to $form->input('value'); based on values read from
ITEMS table.
I have done this without ajax in non-cake projects, reading all ITEMS
with names and values, maintaining the data in a array, assembling the
select input based on valued and ONCHANGE displaying the value using
<div> for the value field.
I wish to know how would you guys resolve a similar problem but
besides I would like to learn what happens behind the scenery when you
do echo $form->input('item_id'); and cake brings bake the field "name"
in the select.
any help or direction would be more than appreciated.
Carlos
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment