So far I successfully implemented an advanced action (in a custom module) by extending ConfigurableActionBase and implementing ContainerFactoryPluginInterface. As expected, it appears listed in /admin/config/system/actions, where new actions can be created and configured. These actions show up in the bulk action drop down menu in /admin/content. Selecting one or more content items and performing the action on them works fine.

Now, since these actions are somewhat consequential, I need to add a confirmation form before executing them.

There don't seem to be any examples on the net, at least not for this particular case. Looking into core modules with similar actions didn't yield enough hints for me to figure this out. ConfirmFormBase and *.routing.yml seem to be unable to deal with bulk actions.

I should maybe note that modules Views Bulk Operations (VBO) and Views Bulk Edit are also installed.

What is the proper way of adding a confirmation form?

  • For an example, user deletion requires confirmation/specification of the deletion method. May 26 at 16:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.