How to ask user input and use it in the eca process

Created on 31 May 2023, over 1 year ago

Problem/Motivation

Usually a site manager wants to use VBOs to set field values on all selected entities at once, but I can't find documentation on how would I do that with an ECA VBO.

I see there's the action template "VBO: Get configuration value" and from its description I suspect I would have to create a custom form, but I'm not sure if I should try to do it directly inside the ECA Process after the "VBO: Execute Views bulk operation" Event.

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇮🇹Italy kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kopeboy
  • Wondering if this is possible with ECA VBO ? (Ask for user input) I would like to modify a few fields in the same node. So, user input is required before bulk update the same data to all selected nodes.

    Thanks,

  • 🇩🇪Germany mxh Offenburg

    Wondering if this is possible with ECA VBO ? (Ask for user input)

    Yes, it's possible using the plugins (events and actions) provided by this module.

  • 🇬🇧United Kingdom jacobupal Leeds

    I assume this is possible too but I can't find any examples... Here's as far as I've gotten trying to do it with title:

    Event:
    VBO: Confirm form Build
    Action:
    Form: Add text field
    field name: set_title

    This successfully places an input form after the action is clicked, and before the operation is executed.

    2nd part:

    Event:
    VBO: Execute
    Actions:
    VBO: Get Config Value
    config key: set_title
    name of token: get_title
    Entity: Set Field Value
    field name: title

    This second part however is not working for me. I can't work out how to pass the form input into the execution stage. It sounds like the "vbo: get config value" action is meant to do it but no dice so far:

    VBO:Get Configuration Value description: "Get a configuration value from the action of the bulk operation and store it as a token. This template supports the usage of tokens. Please refer to the token chapter in the ECA Guide, and if you install and enable the token module, you will find a link to the token browser right below the property panel, which shows you all available tokens."

    Config key:
    The config key, for example message_text. This may also be the machine name of a custom form field. Leave empty to use the whole config. Please note: This action only works upon the event VBO: Execute Views bulk operation.

Production build 0.71.5 2024