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

Mail plugin on submitting form to execute a php sql query and return data with email

mkainz

Member
When user submit the form, how can I make it work this way:

The user submit form.
The php script execute a sql query like "where email found return value DATA", inject DATA in the email that the script is going to send and send a copy of the email to the submitting user.

Is it possible to do something like that?
 
I think this is not possible with email form plugin.
Try to use php form plugin and process script End of for submission(onAfterProcess).
 
Just done!
I tried with php plugin in combo with email plugin, yeah it returned the value but not added it to the email unfotunately.
So here's the workaround I used:

I used a hidden calc plugin element to do the php query (and used it to calc once the form is submitted), then with the {table__formdata} I got the word to search then with a "return $variable" I got the query result I needed.
Then i added the mail plugin to the form and BOOM! It worked.
For everyone could need it in the future. :D
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top