Closed (outdated)
Project:
Form Block
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Dec 2009 at 16:55 UTC
Updated:
28 Apr 2017 at 20:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikey_p commentedI think this could be an option set for each block. I'll look into it
Comment #2
Bilmar commented+1 subscribing
Comment #3
nedjoPossible approaches in a patch might be:
a. in form_alter, set $form['#redirect'] = $_GET['q'];
or
b. In form_alter, register a #submit callback. In the callback, set $_REQUEST['destination'] = $_GET['q'];
Comment #4
robby.smith commented+1 subscribing
Comment #5
mikey_p commentedAlso closing #418790: Registration Destination in favor of this issue.
Comment #6
YK85 commentedsubscribing
rules action for redirect might be helpful to reference
Comment #7
Steff Vanhaverbeke commented+1 subscribing
Comment #8
doublejosh commentedHere is a patch that adds an admin page to form block with a checkboxes to select redirect on registration.
Please double check this work for your scenarios and doesn't conflict with other login modules. (I'm using Logintobaggin with immediate login selected.)
Additionally, it would be better to place this checkbox control on the registration block settings form at admin/build/block/configure/formblock/user_register rather than the one I've just created at admin/settings/formblock, but I don't know how to deal with adding options to that form. Any help? Course it's not a requirement, just an improvement.
PS: I did a check_plain on the
$form['#redirect'] = $_GET['q'];for security reasons. Let me know if something else is required as well.Comment #9
doublejosh commentedComment #10
doublejosh commentedWhops. Sorry. Ran the patch backwards. Redo...
Comment #11
doublejosh commentedAlso found that I needed to test and not remove the redirect when registering from the normal /user/register page!
Comment #12
doublejosh commentedMy patch adds this feature, any help on getting it to the block admin instead of a form block settings page that doesn't need to exist?
Comment #13
YK85 commentedI was wondering if there has been any further development in this feature.
It would be nice to be able to specify the redirect for each form block.
Thank you
Comment #14
doublejosh commentedMy patch just adds "Redirect user back to originating page on register."
Are you thinking a path field on the block edit page?
Comment #15
YK85 commentedHello,
Ah yes, I was thinking a path with tokens to 'originating page' , etc.
I guess this would be a different feature request.
Comment #16
doublejosh commentedI guess the question I was asking is whether Token would be necessary.
Options of "originating page" OR a hard coded URL seems like it would cover it.
Since the only other form blocks I know of (besides registration) is node/add/thing and webform neither of those could make much use of a Token after submit.
Unless of course you want to go to a page using the UID perhaps? But then you could accomplish this with grabbing the UID from the global user (if it was a view for example.)
I just can't think of a real need to Token... plus I'm not experienced enough to build it :)
Just trying to get some clear use cases before I add any of this to my patch.
- - - - - -
Also, I believe I found a bug when the signup-able node is "closed" the registration checkbox still shows, as goes the registration block... since it's visibility is dependent on that. It causes an error when signup tries to register the person for the event. So we'll just need to check for "open" status.
Anyone willing to test this bug with my patch?
I personally use Context to show my blocks, so there might be a need for a Context Signup Status plugin. But that's another thread.
Comment #17
mikefyfer commentedThis functionality would be great. I could just accomplish this with a hook_form_alter, but I'd prefer to use the patch's method.
Any idea if this patch is going to get rolled into the next release?
Comment #18
doublejosh commentedNo clue. I worked that up a while ago and never heard anything back.
Comment #19
Anonymous (not verified) commentedI accomplished this using rules. Pretty simple
Comment #20
quinns commentedYeah, rules is a good way to do this redirect-after-posting.
Comment #21
doublejosh commentedAgreed :)
I'm a Rules lover now too.
Comment #22
mikey_p commentedI haven't seen any recent interest in this issue, so I'm closing it since it's filed against 6.x which is now unsupported.