Multiple add/edit buttons per row in list

busicomp

New Member
I have a reasonably complex(grandfather/father/son with other references) view in my DB.
I've set it as a List in Fabrik, and it displays well. But editing and adding are a problem, of course.
I want to be able to add/edit the father & son DB tables(also created as lists in Fabrik) via their Fabrik forms, from the "view" list, with appropriate field values set.
How can/do I "add" per row buttons into the list display, to open the appropriate form, with correct id(held as element in "view" list) for edit. Or similar for add with appropriate parent id set as default?
 
More details ... I am aware of the php plugin and rediect to a form ... but then how do I then set values in the form's data from the previous list row's values?
 
OK ... Igot it working ...
List PHP plugin code :

$app = JFactory::getApplication();
//Get selected ids
$ids = $app->input->get('ids', array(), 'array');
// get 1st selection
$id = array_shift($ids);
// get seleted row
$row = $model->getRow($id);
// get required id from row
$eid = $row->list-table___column;
// for Add - rowid=0 & default value set [form id currently fixed]
$app->redirect('index.php?option=com_fabrik&view=form&formid=X&rowid=0&add-table___column=' . $eid);

I'll post the edit option when I figure it out ...
 
Very similar to above ...

$app = JFactory::getApplication();
$ids = $app->input->get('ids', array(), 'array');
$id = array_shift($ids);
$row = $model->getRow($id);
$aid = $row->list-table___column;
$app->redirect('index.php?option=com_fabrik&view=form&formid=X&rowid='. $aid);
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top