Hi Andrew,
you are correct. I didn't take that into account.
As I said, the placeholder was actually not ment to be used in the href of a link to the file. At the moment I see no easy solution for this.
There is one more thing which you could try.
The mails are created in the file components/com_visforms/models/visforms.php. There is a separate function for the result mail and the receipt mail.
You could try the following modification in the code of the function sendResultMail, which creates the result mail.
Replace (line 901)
Code:
if ((!empty($visform->emailresulttext))) {
$fixedLinks = JHTMLVisforms::fixLinksInMail($visform->emailresulttext);
$body[] = JHTMLVisforms::replacePlaceholder($visform, $fixedLinks);
}
With
Code:
if ((!empty($visform->emailresulttext))) {
$replacedText = JHTMLVisforms::replacePlaceholder($visform, $visform->emailresulttext);
$body[] = JHTMLVisforms::fixLinksInMail($replacedText);
}
In theory switching the order in which the text is processed, should fix the problem, but first, I have not tested at all and second, I'm not absolutely sure, if changing the order in which the text is processed may cause a problem at any other point. Therefore I cannot promise, that I can merge this change into the Visforms core, even if it works for you.
If you want to try this, make a copy of the visforms.php file first!!!
I think it is not necessary to modify the function for the receipt mail, because displaying a link is a feature in the receipt mail and does already work.
Regards,
Aicha