Active
Project:
Entityform
Version:
7.x-2.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2014 at 16:07 UTC
Updated:
30 Aug 2018 at 18:09 UTC
Jump to comment: Most recent
Hello,
I am using entityforms on my site, and I am trying to programmatically setup a redirect once a user edits a particular entityform submission. What I mean is, I have a list of entityforms that do various things. I am trying to make it so that when a user submits a submission to say, entityform named 'request', and an admin views the submission and uses the 'edit' link to change the values in the submission, once the settings are saved, the admin is redirect to a custom page, NOT the 'submissions summary' page for that entityform. I've tried using #submit handlers but it appears entityforms does it's own redirection.
Does anybody have a suggestion on what I could do to achieve this ?
Comments
Comment #1
tedbowDo you make sure your #submit handler is run last and then add your path to "$form_state['redirect']"?
Comment #2
christianhg commentedI think I'm trying to achieve the same as ex0r. I'm using the hook_form_FORM_ID_alter hook to add an additional submit handler. The new submit handler is definitely called after the original but the redirect is ignored.
Comment #3
jamestombs commentedCustom #submit callbacks are completely ignored.
I've tried adding to $form['#submit'] and $form['actions']['submit']['#submit'] but the function isn't called. I can't see anything in the entityform_edit_form_submit() function that would stop this from working.
Even changing the submit handler using:
doesn't work, the function isn't called despite it being the only function set.
Comment #4
drupixI have this working like this:
Comment #5
salimousavi commentedComment #6
capysara commentedI used #4 and it worked great! Thanks!
I think these are probably duplicates of this issue:
https://www.drupal.org/project/entityform/issues/2512558
https://www.drupal.org/project/entityform/issues/2653098
https://www.drupal.org/project/entityform/issues/2919094
https://www.drupal.org/project/entityform/issues/2081343