pandolfaccia
Member
Hi,
i have two list, one with objects (named pand_inventario) and one with note belongs to objects (pand_inventario_note).
i'd like to create a button on the pand_inventario list to open a new pand_inventario form with one filed pre-compiled with the pand_inventario id.
this is the php code
// get current selected ids and take only the first
$app = JFactory::getApplication();
$ids = $app->input->get('ids', array(), 'array');
//..and take only the first (just in case people select more than one single row)
$ids = is_array($ids) ? $ids[0] : $ids;
//Updating pand_inventario_note___id_inventory's value before showing the form
$formModel->data['pand_inventario_note___id_inventory(raw)'] = $ids;
can someone help me find where i'm wrong?
thanks
alberto
i have two list, one with objects (named pand_inventario) and one with note belongs to objects (pand_inventario_note).
i'd like to create a button on the pand_inventario list to open a new pand_inventario form with one filed pre-compiled with the pand_inventario id.
this is the php code
// get current selected ids and take only the first
$app = JFactory::getApplication();
$ids = $app->input->get('ids', array(), 'array');
//..and take only the first (just in case people select more than one single row)
$ids = is_array($ids) ? $ids[0] : $ids;
//Updating pand_inventario_note___id_inventory's value before showing the form
$formModel->data['pand_inventario_note___id_inventory(raw)'] = $ids;
can someone help me find where i'm wrong?
thanks
alberto