Calc Element's result position

Status
Not open for further replies.

keianrad

Member
I use a clac element to count something with the code listed below:

Code:
$db =& JFactory::getDBO();
$query = "SELECT COUNT(*) FROM `app_tasks` WHERE `status_id` != '5' AND `client_id` = '{rowid}'";
$db->setQuery($query);
$Result = $db->loadResult();
echo $Result;

but it shows the calc element's result in top of the list!

Calc on load = Yes

Fabrikar bug4.jpg

The form layout has been set on bootstrap tab but it is not reason of the issue to that I tried that with the other layouts but it didn't solved.

Thank you for your help.
 
Instead of "echo $Result;" which prints the result on the screen as you have seen, do "return $Result;" to send the result back to Fabrik so it can be displayed and stored in the database.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top