WPForms
98The best WordPress contact form plugin. Drag & Drop form builder to create beautiful contact forms, paymen...
When this is active, attachments sent trough Contact Form 7 shortcode [file ] will be stored in your Media Library
The Store File Uploads for Contact Form 7 plugin enables you to save files uploaded through Contact Form 7 directly to the WordPress Media Library. By default, Contact Form 7 does not retain uploaded files, but this plugin ensures that files are stored before the email is sent. It also provides various filters to modify file names and attachment attributes, allowing for customisation of how uploads are handled.
This plugin is suitable for users who need to manage file uploads through their contact forms and want these files to be easily accessible in the Media Library. It is particularly useful for those who require additional control over the file handling process and want to ensure that uploaded files are retained for future use.
Best for: This plugin suits website owners using Contact Form 7 who need to retain uploaded files.
What it does well
Where it falls short
Store File Uploads for Contact Form 7 is a practical solution for managing file uploads, although it may require some technical knowledge to fully utilise its features.
mirceatm's own description of Store file uploads for Contact Form 7, lightly tidied.
By default, Contact Form 7 dose not keep data it sends trough it’s contact forms.
While plugins like Flamingo save that data, uploaded files are not added to Media Library.
This plugin will save uploaded files to Media Library before email is sent by CF7.
This plugin will raise an event with the the full file path & name.
Subscribe to nmr_create_attachment_file_name filter to get and/or update data before attachment is added to media library.
// The filter callback function.
function example_callback( $file_name ) {
// (maybe) modify $file_name.
return $file_name;
}
add_filter( 'nmr_create_attachment_file_name', 'example_callback', 10, 1 );
Subscribe to nmr_before_insert_attachment filter to be able to change attachment attributes: caption and description are ‘post_excerpt’ and ‘post_content’.
For other attributes, check documentation for wp_insert_attachment.
// The filter callback function.
function before_insert_attachment_callback( $attachment ) {
// (maybe) modify $attachment array.
return $attachment;
}
add_filter( 'nmr_before_insert_attachment', 'before_insert_attachment_callback', 10, 1 );
Optionally, subscribe to nmr_should_skip_save_attachment_to_media_library filter to be able to skip saving the attachment to media library: return true to skip, false is the default behaviour that saves the attachment to media library. Filter nmr_before_insert_attachment will not be called if skip was true.
// The filter callback function.
function skip_media_library_callback( $skip_save_to_media_library ) {
// return true to skip saving to Media Library, false to save.
return true;
}
add_filter( 'nmr_should_skip_save_attachment_to_media_library', 'skip_media_library_callback', 10, 1 );
This plugin will send the final attachment id if you are interested in getting other details, like attachment url.
Listen to nmr_create_attachment_id_generated action.
// The action callback function.
function example_callback_id_generated( $attachment_id ) {
// (maybe) do something with the args.
$url = wp_get_attachment_url( $attachment_id );
}
add_action( 'nmr_create_attachment_id_generated', 'example_callback_id_generated', 10, 1 );
Check the support forum on WordPress.org. If you can’t locate any topics that pertain to your particular issue, post a new topic for it.
It is hard to continue development and support for this free plugin without contributions from users like you. If you enjoy using -Store file uploads for Contact Form 7- and find it useful, please consider making a donation. Your donation will help encourage and support the plugin’s continued development and better user support.
With the default configuration, this plugin, in itself, does not:
It will, however store uploaded files trough Contact Form 7 in WordPress Media Library.
Make sure your website users are aware of this fact!!!
Other plugins for building forms.
The best WordPress contact form plugin. Drag & Drop form builder to create beautiful contact forms, paymen...
The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam sol...
Get a fast contact form plugin. Create advanced forms using drag and drop form builder with all smart features...
Best WordPress form builder plugin. Create contact forms, payment forms & order forms with 1000+ integrati...
Save and manage Contact Form 7 messages. Never lose important data. It is a lightweight contact form 7 databas...
Elementor forms builder to create WordPress forms like contact form, booking form, feedback form, survey form,...