Hi,
I have several sql views, all of them include at least one of 2 fields: 'personne_responsable' and 'produit'.
I imported the views into Fabrik tables and recreated the joins.
I would like to generate a report including Fabrik views (list and details) + the sql views with a filter on these 2 fields.
In my example below I'm including only one sql view in order to make it simple.
Using the Fabrik content plugin, I created an article that looks like the report I want.
The article's content looks like this:
I have no idea how to replace the rowids 1 and 3 with variables.
It looks like the Form PHP plugin does exactly this.
Unfortunately I have zero experience in PHP.
So I went ahead and created a new form (called RSPC, the report's name) with 2 elements: a database join ('responsable') and a cascading dropdown ('produit')
I'm trying the following code, but it's not doing anything, just creating the record in the database.
Please help!
Thanks,
Mathieu
I have several sql views, all of them include at least one of 2 fields: 'personne_responsable' and 'produit'.
I imported the views into Fabrik tables and recreated the joins.
I would like to generate a report including Fabrik views (list and details) + the sql views with a filter on these 2 fields.
In my example below I'm including only one sql view in order to make it simple.
Using the Fabrik content plugin, I created an article that looks like the report I want.
The article's content looks like this:
Code:
<h3>Produit Cosm?tique<br />{fabrik view=element list=2 rowid=1 element=produit___nom}</h3>
<p>{fabrik view=details id=10 rowid=3}</p>
<p>{fabrik view=list id=63 usekey=personne_responsable|produit rowid=1|3}</p>
I have no idea how to replace the rowids 1 and 3 with variables.
It looks like the Form PHP plugin does exactly this.
Unfortunately I have zero experience in PHP.
So I went ahead and created a new form (called RSPC, the report's name) with 2 elements: a database join ('responsable') and a cascading dropdown ('produit')
I'm trying the following code, but it's not doing anything, just creating the record in the database.
Code:
$db = JFactory::getDBO();
defined('_JEXEC') or die();
$resp = $formModel->getElementData('rspc___responsable', true);
$prod = $formModel->getElementData('rspc___produit'), true;
echo "<h3>Produit Cosm?tique<br />{fabrik view=element list=2 rowid=$prod element=produit___nom}</h3>";
echo {fabrik view=details id=10 rowid=$resp};
echo {fabrik view=list id=63 usekey=personne_responsable|produit rowid=$prod|$resp}
Please help!
Thanks,
Mathieu