Fantastic plugin, thank you so much!! I have one issue: when viewing a GF notification email w/ attachments in Apple Mail, the attachments display first in the email body pane. I have 2 PDF attachments on a particular notification, and they both display before the rest of the GF notification content and it looks pretty weird. I would really like to have these attachments display after/at the bottom of the email, after the “main” notification content. Is this possible? Thank you.
]]>SPECS:
PHP 8.2.19
WordPress: 6.5.4
Gravity Form: 2.8.12
The form being used was created with TWO conditions:
– if the user checks the box that they want a hard copy, then the user fills out the extra fields and then the PDF will be sent to the user and the admins should be notified of the request.
– if the user does not check the box for a hard copy, then the PDF would attach to the email, send to the user and send a request copy to the admin.
PROBLEM:
After spending an hour troubleshooting (we disabled ALL plugins except for the theme and GF), we’ve discovered that this plugin causes the following:
– The Admins were not receiving verification emails
– The form spinner would just spin and sit upon submission
– The page would not redirect to the ‘Thank you’ page.
– The User would (eventually) receive the email with the attachment (after spinning for 30 seconds), but the admins don’t receive the request and the page is still sitting and spinning.
– We also verified with server logs that this plugin is the cause of the hangup and, eventually, the site errors out.
I’d like to continue using this plugin if the developer can figure out why we’re experiencing these issues.
Thank you.
My attached pdf file is 6mb but when tested, what I got is random sizes between 2mb – 4mb. Downloaded file is corrupted.
]]>The plugin is working so far, but it works only after resending the conformation. When the original confirmation is send, the attachment is not in the email. I hope you can help solving this.
]]>Hi, i just wanted to let you know that my website’s error reporting shows a deprecated function in your code:
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /XXXXXX/wp-content/plugins/notification-attachments-for-gravity-forms/includes/form.php on line 25
System info:
Hi,
I have installed the plugin, but button not showing in notifications module.
WP 4.8.22
GF 2.2.3.7
No errors in console.
Best regards
Hi together,
I have the problem that if a form being sended, that ill get a wrong file type. Its not a PDF, it has this datatype: pdf_time=1687949639
I’d like to use this product but would like to know if there is any way to make this attachment available on a redirected page after the user fills out the form using a shortcode within a session?
]]>Hi there,
Is it possible to add attachments based on a condition in a form.
Like
add XYZ attachment if someone selects XYZ
add ABC attachment if someone selects ABC
Or do I need to add multiple notifications for every different attachment for every form I have.
Thank you!
We have found that using this alongside WP Offload Media, the attachment of the file errors.
This is due to the file not existing locally, and is instead offloaded to S3, or elsewhere.
Would it be possible to have a filter added to the attachment_send function, as below.
$path = str_replace( $wp_upload_dir['baseurl'], $wp_upload_dir['basedir'], $attachment );
$path = apply_filters('gf_kgm_notification_attachment_path', $path, $attachment_id, $form, $lead);
if ($path) {
$notification['attachments'][] = $path;
}
This will allow other plugins/themes to update the attachment_path as they need.
]]>Hello. I have installed the latest version of the plugin and the latest version of Gravity Forms. I have set everything as per instructions but unfortunately the attachment does not arrive in the mail.
On the other hand, when I enter the Notifications section and click on “Send notification again” then the attachment is correctly present in the mail that arrives. How can I solve? Thank you
Hi, we have this plugin installed on a client site but it does not seem to actually do anything. There is no place on the User Notification edit screen to add an attachment.
We are running GF 2.5.16 and version 1.5 of your plugin.
there is a bug when selecting attachments, when there a file doesn’t have a thumbnail it will trigger an error I added a code to the plugin on my site to fix it, you can change the script by this one
function kgm_add_attachment() {
var mediaframes = wp.media.frames.items = wp.media({
'multiple': true
});
mediaframes.on('select', function() {
var attachment = mediaframes.state().get('selection').toJSON();
for(var i = 0; i < mediaframes.state().get('selection').length; i++)
{
var currentIDS = jQuery('#attachment_ids').val();
if (currentIDS == '') {
currentIDS = currentIDS+attachment[i].id
} else {
currentIDS = currentIDS+','+attachment[i].id
}
if ( (typeof attachment[i].sizes !== undefined ) && ( typeof attachment[i].sizes !== 'undefined' ) ) {
if ( attachment[i].sizes.thumbnail !== undefined ) url_image=attachment[i].sizes.thumbnail.url;
else if (attachment[i].sizes.medium !== undefined ) url_image=attachment[i].sizes.medium.url;
else url_image=attachment[i].sizes.full.url;
}
var file_image = (typeof attachment[i].sizes !== undefined ) && ( typeof attachment[i].sizes !== 'undefined' ) ? '<img src="'+url_image+'" style="max-width:150px;" /></br>' : '';
jQuery('#attachment_ids').val(currentIDS);
jQuery('.details').append('<li data-id="'+attachment[i].id+'">'+file_image+'+attachment[i].title+' <b>['+attachment[i].mime+']</b><div class="remove dashicons dashicons-dismiss" onClick="kgm_remove_attachment(this)"></div></li>');
}
});
mediaframes.open();
}
function kgm_remove_attachment(id) {
var old = jQuery(id).parent();
old.remove();
var currentIDS = '';
jQuery('.details li').each(function(){
if (currentIDS == '') {
currentIDS = currentIDS+jQuery(this).data('id');
} else {
currentIDS = currentIDS+','+jQuery(this).data('id')
}
});
jQuery('#attachment_ids').val(currentIDS);
}
I hope this helps
]]>Hi!
If I try to add an attachment (PDF file), the following JS error happens:
Uncaught TypeError: Cannot read properties of undefined (reading ‘thumbnail’)
in scripts.js line 27:
if (attachment[i].sizes.thumbnail !== undefined ) url_image=attachment[i].sizes.thumbnail.url;
The reason is, that the attachment object does not contain a property “sizes”, perhaps because it is a PDF file without preview image.
But it has a “icon” property with the value of “/wp-includes/images/media/document.png”. Perhaps as a fallback, that should be used.
Could you please fix this?
Thanks,
Marc
Hello,
First of all thank you for this plugin.
I was able to install it and add files to my notifications.
My problem is, when testing, there is no attachment with the notifications.
Did I configure something wrong?
Best regards
]]>Hello,
Could this be extended for Confirmations in the future?
]]>I can add jpg files, but not a MS Word document I want to send as attachment with a notification. Is there a limit to the document types that can be attached? Or is another issue preventing me from adding the .docx file?
]]>Hi there
The attachment button on the notification is visible and when clicking on it it opens up the Media library. But when I try to select a file it doesn’t work.
The console has this error when clicking on any of the files/images:
Uncaught TypeError: Cannot read properties of undefined (reading ‘removeAllPlayers’)
media-views.min.js?ver=5.8.1:formatted
Cache has been cleared and GF non-conflict enabled.
Using Gravity Forms 2.5.11
Hey Guys, while doing a review of the plugin I noticed that after selecting the file you’d like to attach it doesn’t show the file was added, you have to return to Form Settings > Notifications then go back to edit the notification to see that the file has been added. I’ve recorded the issue here: https://docs.wprescue.me/p9ukQpy8
I’ve tested this with only GF and you plugin and using the 2021 theme. No Conflict Mode is toggled off.
Thanks,
]]>We install the plugin and the add attachment button appears on the notification but when we click the button we can’t select an image and the select button is greyed out. Please assist
]]>I am running the new plugin version with the Avada theme active and the newest version of WordPress and GravityForms. The Upload Attachment button doesn’t do anything now and I can’t see previous attachments I have added. Can you help me fix?
]]>Hi there,
I need help with regards to the attachments section under Notifications.
It seems that it disappeared.
I’ve asked Gravity Forms support but they said the issue is with your plugin.
Anyway you can check and fix it?
Thank you
]]>Hey,
Is the plugin compatible with v2.5.0.2? It was working in 2.4, when I upgraded to 2.5.0.2 the button is gone and throws this error in the console:
I tested on 2 separate sites.
Thanks.
]]>Hi,
I have installed the plugin, but when I choose a file to add nothing happened
Hi, this is a very useful plugin. Thank you.
But is there a way I can make multiple file uploads?