Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP code in Smarty 3 #28

Open
valedina opened this issue Jan 15, 2020 · 1 comment
Open

PHP code in Smarty 3 #28

valedina opened this issue Jan 15, 2020 · 1 comment

Comments

@valedina
Copy link

Hello!
In the previous version of Formtools (and Smarty) I was able to include {php} code in Smarty in order to create custom export templates. Now, this is not possible anymore.
I need to create an export template in which I call a php query with a INNER JOIN between Formtools tables and assign the array to a Smarty variable in order to show the results.
What can I do?

@benkeen
Copy link
Member

benkeen commented Jan 16, 2020

Hi @valedina, try adding the following setting to your /global/config.php file:

$g_use_smarty_bc = true;

https://docs.formtools.org/userdoc/getting_started/config_file/

The {php} option was considered unsafe, so it was removed in Form Tools 3. But you can re-enable it by adding that setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants