I don't like to post a request before helping someone on a forum, but I am a kind of a newbie on Breezing form and not a big specialist regarding coding.
Here is my issue.
I would like to display a form on different articles in order to send by mailback an existing attached file wich will be different according to the page the form will be display.
With my poor acknowledgment, I have been able to create an element that take as a value the full path of the document.
The output is correct and if I paste the result in the MailBackFile field, the attached file is sent.
What I would like to do is to pass this produitPDF value to the MailBackFile field in a dynamic way.
The mail is sent without attached files :
- when I put directly the php code in the MailBackFile field (neither with echo or return).
- With ff_getElementByName('produitPDF').value
I am a bit lost with these posts especially because it seems that all I want to do is to override the $attachment value or set the value of bfElementAdvancedMailbackfile with a variable but I don't know where to look.
As I said, I am new to Breezing Form, I chose it for its ability to send attached files.I would like to experience it more before having to set full emails as submitting pieces.
I am of course available to give you more details, and I can only express my gratefulness to anyone who would like to help me.
As you may have seen, in my first post, I had already read this topic.
But because you dit resend me to it. I had a second look.
Instead of redefining the path to my file with the php code I put in the productPHP field, I did a
ff_getSubmit('produitPDF')
, and ... it works.
For any future reader, below is the code I put in Advanced options of my form > More options > Submit pieces / End Submit. It is a mix between the different ones found on the link
mentioned previously
Please refer to my precious message about "produitPDF" especially the $adrFile part that is the path to yours documents.
$this->execPieceByName('ff_InitLib');
$from = 'sender@ILoveJoomla.com'; //change to wanted email
$fromname = 'Sender'; //change to wanted from name
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$attachment = ff_getSubmit('produitPDF');
$recipient = ff_getSubmit('Email');
$isHtml = true;
$name=ff_getSubmit('Nom');
$mind='cri de la victoire';
$body = "
<html><body>
<h1>Find enclosed your doc : </h1>
<table style='color:blue;'>
<tr>
<td>
<strong>Bonjour : </strong>
</td>
<td>
$name
</td>
</tr>
<tr>
<td>
<strong> State of mind :</strong>
</td>
<td>
$mind
</td>
</tr>
</table>
</body></html>";
$this->sendMail($from, $fromname, $recipient, $subject, $body, $attachment, $isHtml);
We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.
How to receive the discount:
Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!