This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
uploaded files - downloadable by all form recipients
Started 15 years ago by georgeb | 8 posts |
-
Hi,
I am looking for a way to have all recipients of my form be able to download the form's "uploads".
When I attach a document to the form and submit it, I receive a confirmation of the email and I can click to download the attachment with no problem. When the form data is sent to "my Users" they see the name of the uploaded files but when they click on it nothing happens.
Is it possible that their email programs are stripping the links from the form data, or is it a setting which needs to be enabled in order for them to be able to directly download the uploaded files?
Regards,
George
Posted 15 years ago # -
Hi George,
That is the expected behaviour indeed. MachForm strip the link and make it only available for admin.
If you need your users to be able downloading it as well, there are few modifications needed.
1) Edit "includes/helper-functions.php" file. Search around line 279 - 283:
if($target_is_admin === false){ $template_values[$i] = strip_tags($data['value']); }else{ $template_values[$i] = strip_tags($data['value'],'<a>'); }
change it to become like this:
$template_values[$i] = strip_tags($data['value'],'<a>');
2) Edit "download.php" search around line 13:
require('includes/check-session.php');
remove the above line.
The above modifications would allow your users to download their files.
MachForm Founder
Posted 15 years ago # -
Thanks Yuniar,
To confirm - I replaced:
if($target_is_admin === false){ $template_values[$i] = strip_tags($data['value']); }else{ $template_values[$i] = strip_tags($data['value'],'<a>'); }
with:
$template_values[$i] = strip_tags($data['value'],'<a>');
And I updated the download.php file as you instructed but I'm still not seeing working links. I have the form sending 1 copy of the data to me as an admin, and one to me as a user and only the admin has the link for the uploaded file.
Any ideas?
Posted 15 years ago # -
Sorry for that! I just realized there is an easier way to do this.
Please disregard the modification for "includes/helper-functions.php" above. (modification for "download.php" still needed though)
Next, modify your "includes/post-functions.php" file, search around line 1171:
$user_email_param['target_is_admin'] = false;
change it to become:
$user_email_param['target_is_admin'] = true;
This one should do it. I've just tested it to confirm.
MachForm Founder
Posted 15 years ago # -
Hi.
I am trying to make uploaded files available to "Users", but the link is not showing up in the confirmation email. How can I have the link to the uploaded file for that form show up whenever someone fills out the form?I have done the modifications suggested above, and it is not working consistently.
Thanks.
Posted 15 years ago # -
So, sometimes it works?
When it doesn't work, is the file already being uploaded correctly?MachForm Founder
Posted 15 years ago # -
Yes the file is uploaded through the form. It works the first time, then it does not work again.
Posted 14 years ago # -
Hmm.. that's weird.
We will need to check into your MachForm further for this.Can you send us your post-functions.php and download.php file please?
Also, let us know the login to your machform admin panel.Please send to: customer.service [at] appnitro.com
MachForm Founder
Posted 14 years ago #
Reply
You must log in to post.