Active
Project:
Form Block
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2012 at 04:08 UTC
Updated:
16 Jan 2018 at 05:23 UTC
Jump to comment: Most recent
Hi, I have a block with node/add/page in it that is visible on numerous pages. When I use the form block to create the new page, the default drupal action is to display the new node. Instead, I'd like to simply refresh the page that contained the formblock. However, since the formblock is on numerous pages, I can't set a hard-coded
$form_state['redirect'] = 'some-page';
option in function MYMODULE_submit
any suggestions would be welcomed.
Thanks,
Dean
Comments
Comment #1
Courtney.B commentedYou could potentially use Rules in conjunction with Rules Support Forms to achieve what you're talking about.
Comment #2
visuaLatte commentedYou could use Rules, probably even without the Rules Support Forms module. A rule could potentially be set up like this:
Event: creating a new node
Condition: Content is of type [...]
Action: Page redirect to /node/[nid]
Comment #3
praveenneelu commentedYour use case is "Redirect users to a different page upon viewing or submitting a form." It is available as a Feature of Rules Forms Support module in Drupal 7 to generate the action when events get triggered.