[integration] Fabrik API

trip

Member
Hi,
Is there any API or Method to get data from database based on form id and row id.
We have used simple database query to resolve this.
But it will be far more practical if there was an API in place.

Matthew
 
Yes, but exactly how you do it kind of depends where / when your code is running. From first principles, it's something like this:

PHP:
$formModel = JModelLegacy::getInstance('form', 'FabrikFEModel');
$formModel->setId($formid);
$listModel = $formModel->getlistModel();
$data = $listModel->getRow($rowid, true, false);

... although in most cases you'd probably be running code somewhere you already have the $formModel you need, and could skip the first two lines.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top