• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Passing Variables

TND Web

New Member
Hi. Just wondering if you can please help.
Ive got 2 calc elements in a form.
Im trying to pass the resulting variables from one to the other
(the first one that creates variables runs using ajax watch)
Ive spent hours trying to get this to work, but still no variable is passed

In First calc-
$session = &JFactory::getSession();
$session->set("login","session_value")

In second calc -
$session->get("login")

Please note, Ive just copied and pasted those from yet another tutorial ive read, actual variables are custom ones, and tried all different formatting
 
You can't use one calc element to calculate in an other calc element in the same form, it's not determined which one is calculated first.
You must do a "complete" calculation in every calc element.

So if calc1 is doing
return '{a}'.'{b}';

and you need calc2 to concatenate '{calc1}' and '{c}' you must do
return '{a}'.'{b}'.'{c}';
 
Thanks Troester
So, ive got one calc that contacts an external API to return vehicle details which it then places into variables.
one of which it creates is-
$vehicledescription = $colour . " " . $make . " " . $model;

I want the second calc to display some of those variables
To use $vehicledescription to display as part of a message to customer

therefore the first calc does not place this part of the information into the DB

How would your solution be formatted?
 
Oh, sorry, I just re-read that
So the whole php has to be submitted again?
Thats not gonna work, as it talks to an API that charges the site owner every time a query is submitted.
Surely there must be a way to store variables from main calc (the one that gathers the data from API) and use those elsewhere?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top