When using Advanced Polling, how do I place a poll inside of a page of content? And then, when the user votes in the poll, how do I keep the user in that same page? It seems like the Drupal default is to take the user to a "results" page.

Comments

luyendao’s picture

I believe there are some modules available for inserting nodes into other nodes, i've never tried it with polls, but i believe it's just like any other node.

Conversely you can also add a new region to your node-page.tpl.php template OR you can use the panels module, and insert the polls block into a specific page, by overriding the url in panels to match (and thus override) the one you gave for that page.

As for the redirection, i don't know much about the advanced polling module, but i think you'd basically have to hack it, to extend it so you can pass in the current page you are on. the thing is, a poll going to its results makes sense, it will have no idea of course that it's embedded in another page. You'll have to do smething creative there.

dorkman’s picture

I'll try your suggestions.

Yeah, I was hoping it was something simple, and I wouldn't have to be creative. I do want the results posted, I just want them posted in the page where I've inserted the poll...

The guys at teamsugar have done a good job with this problem. I've tried to contact them, but, no luck yet.

Thanks again.

Logrise’s picture

And how to insert not link, whole poll form into the page node?
I`ve found this http://drupal.org/node/164168#comment-1019222
But it is not simple...
Internet marketing agency Iritera.ru интернет маркетинг агентство Iritera

Petec-1’s picture

Dorkman - did you solve your problems. I have both of these as well. Can you email me if you know a solution - pete.comley@virtualsurveys.com

Thanks,

Pete

richardwo’s picture

Hi,

I added a poll to a page with the following :

$myoutput = poll_block('view');
echo $myoutput['content'];