Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
when i edit a file i see in the url "...%?destination=admin/content/file"
(complete url is /admin/content/file/edit-multiple/%?destination=admin/content/file)
Is it possible to change this destination with a patch or with a hook ?
I have tested rules for this with no success.
Thanks for your help.
Comments
Comment #1
kumkum29 CreditAttribution: kumkum29 commentedInfos i use:
Plupload integration module 7.x-1.2
Multiple forms 7.x-1.0
Comment #2
web506 CreditAttribution: web506 commentedAny solution for this? I am trying to do the same thing.
Comment #3
joseph.olstadyes create your own hook_form_alter implementation , mymodule_form_alter($form, $form_state) and change the redirect value in the form elements based on a an indicator in form_state that is found during edit a file
Note: see other examples of using hook_form_alter
there's more than one way to do this though, thats just one of them.
You can also change the submit handler and have it process your code instead of the default submit handler or else do both.