Closed (fixed)
Project:
Form Block
Version:
6.x-1.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 May 2009 at 15:12 UTC
Updated:
27 Jan 2012 at 08:54 UTC
Hey - this is a cool module and almost just what I was looking for ;-) You're saying this would be great for panel pages. I think so too, the only thing that bothers me is that after I create a node, I get redirected to the new node. But if I was gonna use it on a panel which, say, also displays a View of nodes - I would wanna create the node on that same panel and after node creation get redirected back to that panel with my View, only now with the new node in it.
Any ideas on how to accompolish that? Maybe by adding drupal_get_destination to the save button? http://api.drupal.org/api/function/drupal_get_destination
Comments
Comment #1
nedjoThis could be done by registering a #submit callback to the form and, in the callback, setting the destination to the current location:
Or perhaps by adding a #redirect to the form?
Comment #2
aschiwi commentedAnd how would I add anything to a form, if it's a node/add form in a block? I have no idea where to start looking...
Comment #3
aschiwi commentedWith the help of a friend I created a mini module which gets the current location and redirects you back to where ever you created the node from.
Comment #4
aschiwi commentedComment #5
aschiwi commentedOh man, I just saw this is posted in the wrong module issue queue! I meant to post this in the formblock queue, I'm gonna try to change the project on this :-(
Comment #6
radiorel commentedIn case anyone's looking for a way of doing this without getting too deep into code, this can also be achieved using the Rules module and setting up an 'after saving new content' rule on a particular content type that redirects to a custom page.
Comment #7
trevorfoulk commentedi'm using form block and having this exact problem - when the user creates a new node, i want to go back to the page the user created the node on, not the new node.
i am a pretty experienced php programmer but new to drupal - can someone give me some help with context here - where do I put this code in order to make this work?
thanks
Comment #8
Makku01 commented@ aschiwi: the redirect of the form works fine, but what if I only want to redirect if the form is submitted via formblock module? The default node_edit form should not redirect to a specific destination. Any ideas? Thanks