Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I have a lot of nodes on the page and I've edited many of them it would be great to have an "update all" button that updated all of the edited nodes on the page.
This may require some new UI like a checkbox for each record so you can say "include in the update" on a per record basis and default them to "not checked" but automatically check it if the row gets edited.
Comments
Comment #1
doc2@drupalfr.org CreditAttribution: doc2@drupalfr.org commentedVery good idea!
Comment #2
dman CreditAttribution: dman commentedGosh yes.
This is what I really want.
I've got it set up great (thanks for the recipe) to list my many image thumbnails alongside their captions and tags ... but we have to hit a different 'update' button each change.
I know that it's quite a bit harder to put all the nested fields into one big form then figure out what to change ... but this would be the real killer app for bulk edits if it can happen.
Comment #3
doc2@drupalfr.org CreditAttribution: doc2@drupalfr.org commentedEditable fields offers such a button, within a specific view. But it can't edit other content types such as taxonomy terms or even the title of the node...
Comment #4
Aren Cambre CreditAttribution: Aren Cambre commented[canceling comment]
Comment #5
Aren Cambre CreditAttribution: Aren Cambre commentedReverting status and moving to 6.x because this is a new feature.
I think the way to do this is have a master Save All button for the entire view. The button is normally disabled, but if any field is edited, the button would become active. Once the user is done editing, he hits Save All, and all nodes that were changed will be saved.
Comment #6
Royce-1 CreditAttribution: Royce-1 commentedsubscribing
Comment #7
pimousse98 CreditAttribution: pimousse98 commentedsubscribing
Comment #8
shafter CreditAttribution: shafter commentedSubscribing
Comment #9
sitron2 CreditAttribution: sitron2 commentedsubscribing
Comment #10
danielbeeke2 CreditAttribution: danielbeeke2 commentedPut this in the header of the view, you have to use PHP filter.
Comment #11
rorymadden CreditAttribution: rorymadden commentedsubscribing
Comment #12
adf1969 CreditAttribution: adf1969 commentedsubscribing
Comment #13
karenann CreditAttribution: karenann commentedI tested out the script in #10 and didn't work for me. It only submitted the first (#node-form).
As I was playing around with it, I added alert('test') after both .submit actions. This had the obvious action of creating a bunch of alert boxes and the unintended result of submitting all the forms and gave me a bunch of drupal_messages of success (1 for each form).
I can't quite get my brain around why. Or how to do this without having the alerts there.
Comment #14
dman CreditAttribution: dman commentedEeek. That jquery way will try to fire a bunch of form submissions all at the same time. Highly fragile.
Either the form is restructured (currently it's a big set of different forms) into a tree so that it can take a number of submissions at once (you'll still get many messages) or the individual submit buttons need to become AJAXified - which is not impossible, and probably will turn out pretty sweet.