Closed (outdated)
Project:
Webform
Version:
7.x-4.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 May 2012 at 10:12 UTC
Updated:
23 Sep 2025 at 16:36 UTC
Jump to comment: Most recent
Comments
Comment #1
scott m. sanders commented+1 for this.
Comment #2
knalstaaf commentedComment #3
quicksketchThanks this is a good suggestion. Note that if you so desired, you could add this functionality immediately by configuring a View and using Views Bulk Operations to replace the default listing of submissions with a view... though I suppose we'd need to make Webform provide some actions to allow bulk deletion through VBO.
It's a good request, but I'm not sure how I'd like to handle it. It seems like rebuilding the VBO interface (the same way Node and Comment module do) is a wasted effort, especially when we already have Views support.
However like all features, this would only be added to the 4.x release. 3.x is maintenance only at this point.
Comment #4
sonicthoughts commented+1 Definitely high value!
Comment #5
aniket_m commentedCan anyone knows how to bulk delete webform submissions?
I tried "Bulk Operation" for multiple delete, but not succeed in that.
Thanks in advance
Comment #6
johnofjack commentedquicksketch, as you mention, bulk deletion isn't currently possible in VBO. If you wanted to bulk delete webform submissions, would you recommend writing a custom VBO action, or is there a better way for it?
Thanks!
Comment #7
Kuldip Gohil commented+1 Must needed
Comment #8
danchadwick commentedA patch to add the actions to allow VBO to work with webform are welcome.
Comment #9
danchadwick commentedOnce the hard-coded tables are replaced with views and actions are added, the user could do this by modifying the built-in view for displaying the results.
Marking as postponed pending progress on using views internally.
Comment #10
danchadwick commentedThis is now possible once #2330557: Replace hard-coded tables with views is committed, however someone needs to write the delete VBO action. @johnofjack -- want to take that on?
Comment #11
danchadwick commentedClosing for lack of activity and the ability to write the VBO action needed. Please re-open if you have a patch.
Comment #12
drupaledmonk commentedPeople coming here for a solution: Have a look at this contrib module which has similar functionality. https://www.drupal.org/project/webform_submissions_multiple_delete
Comment #13
johnodonnell@mac.com commentedI stumbled across this thread while trying to find a way to delete a large number of submissions (over 3000). Using Clear didn't work, the function would choke under the number of records. Webform tries to load all submissions at once before deleting. But I found a hack around this.
I looked in the web form.report.inc file and found this line inside the webform_results_clear() function
webform_get_submissions() takes a pager value that indicates the number of records to return with a default value of all. Setting it to a more manageable number enables you to clear submissions a few hundred at a time.
Once you clear all your submissions, you can change it back.
Comment #14
duncan.moo commentedThe following sandbox module provides VBO for webform results: https://www.drupal.org/sandbox/catchsaid/2237707
The issue with the module https://www.drupal.org/project/webform_submissions_multiple_delete is that it is not a view and therefore would not support a likely usecase where one would want to filter results and then bulk-delete the filtered subset.
Comment #15
danchadwick commentedHmmm. Not opposed to rolling that vbo support into webform core. It's a pitty that hook_action_info doesn't allow a file option so that the VDO code wouldn't have to be loaded for every page.
If someone is interested, please re-open with a patch and round up someone else to review it.
Comment #16
RAWDESK commentedComment #17
RAWDESK commentedI've been experimenting briefly with this sandbox solution at #14 and came up with a first conclusion :
The new VBO action, as returned by webform_vbo_action_info(), is not visible in the views bulk operation field setting :
/admin/structure/views/nojs/config-item///field/views_bulk_operations
So no entrypoint to be able to test committed code.
Since VBO actions are entity type compliant, i've changed the action type from 'node' to 'entity' at
sites\all\modules\webform_vbo\webform_vbo.module
Did the same change at sites\all\modules\webform_vbo\views\webform_vbo_bulk_operations_handler_field_operations.inc
I was then able to trigger the new VBO action "Delete Webform Submission" from my view, but the same error was given as reported at https://www.drupal.org/node/2674906.
This error originates from this public function in VBO class views_bulk_operations_handler_field_operations
So i am concluding that the class extension on this function, as written inside this sandbox module, is not working as supposed to.
Instead of the inherited get_entity_type() function, it is calling the original instead, and returning the error via _views_bulk_operations_report_error().
Not familiar with class extention within Drupal between 2 separate module.
What I've tried is adding this line on top of the main webform_vbo.module :
module_load_include('inc', 'views_bulk_operations', '/views/views_bulk_operations_handler_field_operations.inc');but without luck yet.
If anybody wants to dig further into this, i'm volunteering some extra time to cooperate and find a solution with this sandbox module.
Comment #18
RAWDESK commented#UPDATE
Discovered the reason why the get_entity_type() was not triggered from the inherited class in this sandbox module.
Inside sites\all\modules\webform_vbo\views\webform_vbo.views.inc
the 'webform_submissions' view, which comes standard with the installation of Webform, is referenced in the data array.
I was working on a custom view named 'kids_submissions', so the necessary field operations handler was not added.
If you want to work with a custom webform submissions view, created via /admin/structure/views/add, you practically need to alter this hook which is imho not the right approach.
A more generic alternative i came up with deals with the entity type determination hack a bit more more Drupalwise.
Instead of extending the by VBO provided views_bulk_operations_handler_field_operations class, i wrote an entity_info hook :
which creates a new webform_submission entity type, allowing VBO to handle it by its own field operations handler.
Together with some other minor bugs, i got this webform_vbo module e2e working now.
When i find some time, i'll commit it to the sandbox project for further review and testing.
Comment #19
kevster commentedhi Rawdesk - that would be really useful - I could really do with this one working, happy to test/review when its ready...
Comment #20
RAWDESK commented@kevster,
It will be something for the upcoming weekend to work on (too busy from Monday to Friday).
I'll additionally give you my real plan with this module :
Beside deletion of submissions, i would also like to introduce the well known VBO "Modify entity values" action.
Not based on real entity fields, but webform (submission) components.
Are you up to co-test this scope ?
Thanks upfront !
Comment #21
tip-ok commentedHi RAWDESK, any chance to get webform_vbo for testing?
Comment #22
RAWDESK commentedHello,
The urgency for the vbo actions availability has been lowered by my client, but it's still on the roadmap.
By the end of this month, i will start with further development on it.
Thanks upfront for your patience.
Regards
Comment #23
danchadwick commentedI would discourage any module name from starting with webform_. Suggest webformvbo instead. This avoids namespace clashes.
Unrelated to webform, I'm using vbo with a custom table using this:
http://drupal.stackexchange.com/questions/114364/adding-vbo-to-an-entity
Comment #24
RAWDESK commented#UPDATE:
Issue has been set out-of-scope by my client, since discontinuation of Drupal as technology for their webpresence.
Comment #25
erbzh commentedBulk delete submissions works with Webform (7.x-4.18), VBO (7.x-3.5) and Webform Entity (7.x-1.x-dev / 2 Nov 2015).
Bulk re-send emails should work too.
Comment #26
liam morlandThat sounds like the solution.
Comment #27
skylord commentedHm. It looks like workaround but not as production-ready solution. I've worked a lot with WebformEntity - it's very buggy, still has not any release (even alpha or beta) and will be overhead if someone just wants to add mass operations support for webform results page.
Comment #28
liam morlandOK
Comment #29
liam morlandDrupal 7 is no longer supported. If this applies to a supported version, please re-open.