All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: using link to display embedded poll with pre-selected answer / trigger vote  (Read 400 times)

0 Members and 1 Guest are viewing this topic.

Offline brotherharry

  • Newbie
  • *
  • Posts: 1
    • View Profile
I'm wondering if there's a way to use url paths / links as votes / or to target preselected answers.

What I want to do is promote a poll via an email newsletter.
Form code/ajax in most email readers is a no-no for anti-spam/junk/security settings so I thought to recreate the poll in basic html without <form> tags, but code the individual answers as links.

What I want to happen next is for the link to point to (ideally) a poll results page (as if the user had submitted their vote directly from the blog or failing that to point to a poll page with their answer pre-selected ready for them to tick.

I can code the landing page/post fine by embedding
[poll id="#"]
in the post

What I'm looking for is some variables to append to the link e.g.

/blog/a-poll-page[bold]?id=poll_3&answer=poll-answer-10[/bold]"

that I could target either a vote or pre-fill the question on the page.

example code:

Code: [Select]
  <p style="text-align: center;"><strong>Question Text ?</strong></p>
  <div id="polls-3-ans" class="wp-polls-ans"><ul class="wp-polls-ul">
<li><input type="radio" id="poll-answer-10" name="poll_3" value="10" /> <label for="poll-answer-10"><a href="http://www.myblog.com/blog/a-poll-page?id=poll_3&answer=poll-answer-10">Answer one</a></label>
</li>
<li><input type="radio" id="poll-answer-11" name="poll_3" value="11" /> <label for="poll-answer-11"><a href="http://www.myblog.com/blog/a-poll-page?id=poll_3&answer=poll-answer-11">Answer two</a></label>
</li>
<li><input type="radio" id="poll-answer-12" name="poll_3" value="12" /> <label for="poll-answer-12"><a href="http://www.myblog.com/blog/a-poll-page?id=poll_3&answer=poll-answer-12">Answer three</a></label>
</li>
</ul>
  </div>


guidance / workaround / solutions gratefully received...