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

Email to (eval): access data

Status
Not open for further replies.

georgie

Member
Hello

In a Email plugin for a form, in the field "Email to (eval), I can not access the data submitted...
Sorry, I came from Fabrik3 :)

I tried a lot of things, for example:

PHP:
$origData = $formModel->getOrigData();
$test = $origData[0]->fb_message___theme;

var_dump($test);
exit;
PHP:
$origData = $formModel->getOrigData();
$test = $origData->fb_message___theme;

var_dump($test);
exit;
PHP:
$test = $this->data['messages___theme_raw'];
$test = is_array($test) ? $test[0] : $test;

var_dump($test);
exit;
PHP:
$test = $this->data['messages___theme_raw'];
$test = is_array($test) ? $test : $test;

var_dump($test);
exit;
PHP:
$test = $formModel->formData['messages___theme_raw'] ;

var_dump($test);
exit;

But always this kind of error:
Warning: Undefined array key "messages___theme_raw" in /home/clients/3ed8566f18b57c2f07041f9d7852d719/sites/j4binv.master-geomatique.org/libraries/fabrik/fabrik/fabrik/Helpers/Php.php(69) : eval()'d code on line 7
NULL

Please have you an idea? Is it a bug or I just miss something?

THX!
 
ok, found it.
Please change line 240 in plugins\fabrik_form\email\email.php
to
'thisVars' => ['data' => $this->data]]);

Then the F3 $this->data['something'] should do again.

$origData:
Should do. Did you test on a new record? (origData is empty in this case).
 
Right, your change works!

Now the F3 "$this->data['something']" (that I used with F3 indeed) works with F4!
What about the change "thisVars"? You will include it in the current Gamma2 or the next Gamma3?

$origData:
Should do. Did you test on a new record? (origData is empty in this case).

Yes indeed, new record! OK understood.

Thank you Troester!
 
Last edited:
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top