Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
I'm currently using VBO to flag (or unflag) nodes en masse. This works fine but in order to edit the flag fields, the user must do this for each node individually. I'm trying to take the functionality one step further by also allowing for the mass editing of the flagging fields.
The ideal solution would allow users to select multiple nodes to mass flag while also being able to edit the details of that flag in the same action. Is there a way to do this with the current versions of Flag and VBO? Help awaited.
Thanks.
Comments
Comment #1
joachim CreditAttribution: joachim commentedThe VBO action edits entities. Here what you're after is creating entities.
You could see if there's a way to chain the two actions in some way, and first create the flaggings and then pass them to the edit action.
Alternately, you could extend the flag action to have the entity fields in the confirm form.
Comment #2
ilreports CreditAttribution: ilreports commentedThanks for the reply.
Am I after creating entities by flagging them? The users aren't creating content. They are only flagging existing content that is created administratively. The "flag fields" I mentioned are the fields that I have in the confirm already.
It works when flagging nodes individually. I'm just trying to figure out a way to do have have the confirm form apply to multiple nodes at once and am trying to figure out the best approach.
Comment #3
ilreports CreditAttribution: ilreports commentedConversely, simply flagging multiple nodes at once also works well with VBO. It's the additional items in the confirmation form that I'm also trying to reach in a mass action, if that makes sense.
Comment #4
joachim CreditAttribution: joachim commented> Am I after creating entities by flagging them?
Yes, each flagging is itself an entity. That's the thing you want to set field values on, isn't it?
Comment #5
ilreports CreditAttribution: ilreports commentedOk understood. I didn't realize that the flaggings were themselves entities.
Comment #6
ilreports CreditAttribution: ilreports commentedHowever, that leads me wonder why, given that they're entities, are their fields not editable with VBO?
Comment #7
joachim CreditAttribution: joachim commentedThey are -- but the entities need to exist first for VBO to be able to operate on them!
Comment #8
Yuri CreditAttribution: Yuri commentedHave one of you been able to actually use Rules to set the field values of flaggings?
I can't see how to fetch the flagging entity and make the fields available.
Comment #9
MacaroniDuck CreditAttribution: MacaroniDuck commentedWas this ever resolved?
This was very easily accomplished in Drupal 6. You could set the View Style to Bulk Operations and have a flag action complete on multiple nodes without additional screens. I'm not seeing that this is possible in 7.
Comment #10
joachim CreditAttribution: joachim commented> Was this ever resolved?
Someone needs to write a patch for this -- or pay a developer to write a patch -- then post it here and have it reviewed, then committed.
Comment #11
apmsooner CreditAttribution: apmsooner commentedHeres the patch that will resolve this: https://www.drupal.org/node/2269391