Wednesday, December 9, 2009

Adding Poll to a Blog Post

Was discussing about the most frequently used / favorite *nix and I thought of adding a Poll on this in a Blog post. Here's how to do this ...


I played around with the blogger menu's & settings, but there was no way I could add a poll to a blog post.

So I went the round about way of creating a Poll on the side menu and then putting that code into my post. Voila ! and it worked like a charm! Here are the steps in detail:

  1. In Blogger/Blogspot, Go to the Layout Tab
  2. Click on the "Add a Gadget" link in the right panel
  3. Click on the "Poll" gadget from the "Basic" list - this pops open a new window
  4. Enter the Poll Question and list of answers you expect people to choose from
  5. There are four options - you can remove as many as you don't want or add more too
  6. Select whether users can choose multiple answers - based on how you want your poll to be
  7. Select the end date & time for your poll
  8. Save the poll
  9. Click on the "View Blog" link at the top and then view the source
  10. Search for the question in your poll in the source - you will see an <iframe> tag near it
  11. Copy the full tag from <iframe> to </iframe>
  12. Now create the new post to which you want to add this poll to
  13. Go to the "Edit HTML" tab if not already in it
  14. Paste the copied tag inside the post in the location where you want this poll to appear
  15. Save & Publish this post
  16. Go back to Layout and remove this gadget

After this, your post & the poll inside it should still work perfectly!

Here are a few things that you can do with the iframe properties:
  • Adjust the value of the "height" property
  • Adjust the value of the "width" property of the "style" property
  • Set the value of the "scroll" property to "no" to remove scrollbar
  • Add "overflow:hidden" to the "style" property to remove the scrollbar

4 comments:

D. Williams said...

Thanks for this post!
I had been trying to figure out how to add a "poll" to EACH of my postings.

D. Williams said...

Don't know if you'll be able to get back to me, but the first time I pasted the source code in a posting it worked fine. The next time the poll contained the results from the first posting. What did I do wrong?

Darshan Shah said...

Thanks for checking back; I think what you may have done is re-used the same poll code from the first time. Remember: you need to create a new poll each time and paste that new code into your post. Let me know if that helps or I will do a bit more digging ...

Indiana Appliance Service said...

Thanks ggreat blog post

LinkWithin

Related Posts Plugin for WordPress, Blogger...