• 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.

Other element's data in dropdown via placeholder

automill

Member
Hi,

I am using dropdown element and correctly getting the dropdown list through EVAL method using query. I need to link the "aricle id" value in the query, for that I can use:

Code:
$app = JFactory::getApplication();
$id = $app->input->getInt('id', 0);

I am storing the "aricle id" in another field element via formOnload method for use in other elements also.

Now I want to access this field in dropdown element via placeholder as the form will be edited somewhere else and will lost the id value on load, like below:

Code:
$id = '{xxxx_tablename_article_id}';

but getting no value through placeholders.

Also tried many methods like:

Code:
$formModel->data['xxxx_tablename_article_id'];
$this->data['xxxx_tablename_article_id'];
$formModel->fullFormData['xxxx_tablename_article_id'];
$data['xxxx_tablename_article_id'];

but got nothing.

Any help will be appreciated
Thanks
 
Yes... But placeholder only in dropdown advance EVAL option not working.

This is working for databasejoin, calc element etc. I am using the placeholder in dropdown element first time.

Do they actually work in dropdown. I have searched the forum but did not find any case regarding this problem.

Thanks
 
Do they actually work in dropdown.
In my case the placeholder in dropdown element don't work in advance options.

So I resorted to populate the JSON data into the dropdown data via Ajax method.

Hopefully, some day. It may work.

Thanks
 
Hi automill, yes I agree, the placeholders don't work in the advanced eval option of dropdown and checkbox. Spent hours trying to get it to work, and I see you have experienced the same problem.

Weird thing is that {$my->id} works fine, perhaps this is a different function that processes the external joomla object.

Many, many years ago I am sure I hit on this same problem, and Hugh or Rob fixed it, perhaps it has crept back somehow.

Hopefully Hugh can modify it to run it through the placeholder replacement function. If someone could point me in the right direction, I could fix it and post update

Latest github with PHP 7.2
 
Last edited:
Found the problem....... looks like someone commented out this code in line 3925, which results in $data being null from com_fabrik\models\element.php

$w = new FabrikWorker;
//$data = empty($data) ? $this->getFormModel()->getData() : $data;
$pop = $w->parseMessageForPlaceHolder($pop, $data, false);


This was commented out between July last year and Sept2019, as my download in July2019 did not have this code commented out, but in Sept2019 it was there.

Would someone be so kind as to correct it in the github repository please so next time we update, the error has been corrected

Thank you
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top