chronoforms v5 static attachment

88 Views Asked by At

I've a problem sending an email with chronoforms V5 with a static attachment using some variables for the path:

THIS WORKS (no variables)

<?php
 $path = JPATH_SITE.'/avvisi/B/';
$form->files['avvisobonario']['path'] = $path.'attachment1.rar';
?>

THIS DOESN'T WORK (with variables)

<?php
$path = JPATH_SITE.'/avvisi/{avviso_cartella}/';
$form->files['avvisobonario']['path'] = $path.'{avviso_mavpdf}';
?>

Please note that I assured that the content of the variables is right in other words: {avviso_cartella} is B and {avviso_mavpdf} is attachment1.rar

Could anyone help me please? I think that it is a very very simple problem but I don't know what to do

thanks a lot for your help

1

There are 1 best solutions below

0
GreyHead On

I think that the problem is that you can’t use the {} short codes in php, use $form->data[‘name’] instead