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

doc2@drupalfr.org’s picture

Very good idea!

dman’s picture

Gosh 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.

doc2@drupalfr.org’s picture

Editable 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...

Aren Cambre’s picture

Status: Active » Closed (duplicate)

[canceling comment]

Aren Cambre’s picture

Version: 5.x-0.1 » 6.x-1.x-dev
Status: Closed (duplicate) » Active

Reverting 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.

Royce-1’s picture

subscribing

pimousse98’s picture

subscribing

shafter’s picture

Subscribing

sitron2’s picture

subscribing

danielbeeke2’s picture

Put this in the header of the view, you have to use PHP filter.

<style type="text/css">
.view .form-submit{display:none;}
</style>
<script type="text/javascript">
function submitforms()
{
    for (i=0;i<=$('.view form').size()+1;i++)
         {
             $('#node-form-' + i).submit();
         }
$('#node-form').submit();
}
</script>
<a href="javascript:submitforms()">Save All</a>
rorymadden’s picture

subscribing

adf1969’s picture

subscribing

karenann’s picture

I 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.

dman’s picture

Eeek. 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.