[development] [Fwd: Polls redirecting to view page instead of node page]
Idan Arbel
idan at arbel-designs.com
Sat Aug 7 21:28:35 UTC 2010
I’m not really sure how to do this, I've looked into the poll.module and the redirect there is set to FLASE, also It looks like there is some sort of logic after the form is submited, and I don't really know how to get the NID so I can redirect to the page.
Idan
From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Lee Rowlands
Sent: Tuesday, August 03, 2010 2:32 AM
To: development at drupal.org
Subject: [development] [Fwd: Polls redirecting to view page instead of node page]
Hi Idan
You need an implementation of hook_form_alter for the poll form's form_id that adds a #redirect property.
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#redirect
You may need to compete with views on this property (especially if the view has an exposed form) so your module might need a lower system weight than views
Lee
-------- Forwarded Message --------
From: Idan Arbel <idan at arbel-designs.com <mailto:Idan%20Arbel%20%3cidan at arbel-designs.com%3e> >
Reply-to: development at drupal.org
To: development at drupal.org
Subject: [development] Polls redirecting to view page instead of node page
Date: Tue, 3 Aug 2010 01:53:58 +0300
Hello,
I have a view with a bunch of poles being displayed (using the poll module).
The problem is that after submiting a poll (via the views page) the page refreshes and stays on the view page. Any way to get the poll to redirect to the poll node page once the user votes on a poll?
Thanks
Idan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100808/ff1a8090/attachment.html
More information about the development
mailing list