Hi, im having some trouble with a select widget, i have 2 selects to
fill, one from a different table

i have a main_table and it have one field for each select, table_a_id
and table_b_id,

The problem is when i try to use that form to edit the one record from
main_table, i fill the first one in the Form Class like this

$this->widgetSchema['table_a_id'] = new sfWidgetFormPropelChoice(array
(
  'model' => 'TableA',
  'add_empty' => true,
));


it works fine, now i need to fill the other select with the data from
the table_b asociated with the table_a, like this

$this->widgetSchema['table_b_id'] = new sfWidgetFormPropelChoice(array
(
  'model' => 'TableB',
  'add_empty' => true,
  'criteria' => TableBPeer::getDataCriteria(1)
));



TableBPeer::getDataCriteria() is wroking with the "1" but i need to
send to that function the table_a_id value cause there is a relation
between the table_a with table_b

i've tried everything, things like this $this->widgetSchema['TableA']-
>getValue() but nothing works, somebody knows how could i do this?

Thanks in advance.

Francisco Calderón

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to