0

We'd like to change the functionality of the DELETE button at the bottom of a node's edit page to redirect to the node's dedicated delete form instead of displaying the JS popup confirmation.

This is because we have a custom block on the delete URL (/node/NID#/delete) that displays extra help text and warnings that we manage through a custom block.

We have access to the node's actions via hook_form_alter() but I'm not sure how to change the functionality to redirect to the /node/#/delete url when clicked.

screenshot shows dpm($form['actions']['delete']);

enter image description here

1 Answer 1

1

Removing the 2 data-dialog attributes should do it I think. The button is already set to go to the correct URL. The dialog functionality is sitting ontop of this. So if you remove it then it should go to the usual delete URL

1
  • Perfect, thank you! Commented Jun 24 at 13:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.