Surveys WordPress Plugin

The Surveys WordPress plugin lets you add surveys to your blog. You can let the visitors take surveys and see the result from the admin side. The user who take the survey can enter their details at the end of the survey – or leave it as an anonymous result.

If you are new to this blog, this is the Plugin Week. I am going to release one wordpress plugin each day, every day for one week(ie. Monday to Friday). Each day you will get a new plugin by me. This is the fourth plugin in this series. The earlier ones were…

Note: Surveys is a beta plugin(as are most of the plugins released in the Plugin Week) – so watch out for bugs. And trust me, there will be a lot of them.


First, Download, install and activate the Surveys plugin. Then go to Manage > Surveys section to create new surveys – or edit existing ones. After creating a survey insert the HTML comment [SURVEYS 1] into a post. Here, the 1 should be the ID of the survey you want to insert into that post.

The client side of the plugin will look something like this – your visitors will see this part…

You can see the result of the survey from the admin side – there are two ways to see the data…


This will show the results each question by aggregating all the data so far. This will look like a poll result. This mode is useful to make decisions – you can immediately see the most favored answers for each question.

Individual Responses

You can also view all the answers provided by each visitor one by one. This mode has its uses as well.

See it in action

I have set up a demo for Surveys over at BinnyVA WordPress demo blog. Take a look.


If you have any suggestions or notice any problems with the plugin, post it in the Surveys forum. I’ll take a look at it – as soon as the Plugin Week is over – I am way too busy right now 🙂

Next plugin – will be released tomorrow.

About Binny V A 102 Articles
Freelance Web Developer on the LAMP Platform. Maintains a blogs Other sites include Bin-Co and OpenJS


  1. Ah never mind Binny, I found it in show_survey.php.
    If anyone else needs it, add:

    foreach($_POST[‘question_id’] as $question_id) {
    if(!$_POST[‘answer-‘ . $question_id]) { echo “Sorry, you did not answer the following questions: $question_id. All questions are required. Please try again.”; }

    after this line in show_survey.php

    if(isset($_POST[‘action’]) and $_POST[‘action’]) {

    and go back to them form

    • I like this idea a lot but when I do as you say I get an error…

      Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/orvzauhv/public_html/ on line 16

      Any help appreciated or even better how could we get it to stop the person moving to the next page if they haven’t answerd all the qustions


  2. Thank you for a great plug-in !

    There’s one thing that would ‘fit’ your plug-in… when ‘focusing’ on the user-answer (with a radio/checkbox in front)… the checkbox/radio should automatically get ‘checked’ without the user’s input.

    A simple 1-liner can do this (maybe someone else is interested in this so I’m posting it here)
    jQuery("input.user-answer").focus(function() { jQuery(this).prev().attr('checked', true); });

    Just add it (inside script.js) above:

    Have a great day 😉

  3. On my site, only logged in users see the posts that have surveys. I’d like to make it so that the login information is captured (instead of people having to provide it) and that they only get the survey once. Can you point me in the right direction for making these changes?

  4. I would like to export the data as a CSV file, however, it is exporting as a PHP file. The software even asks to export as a CSV file. Please help. Thanks!

  5. “Export to CSV” link doesnt work for me – i go to ‘see all answers’ then ‘export to csv’ and it just gives me text on a web page… can anyone help me get around this and export to excel?

  6. I don’t even have a CSV export link, button, or anything related to exporting the data. I am using the latest version of the plug in. Where would I find the export feature? Without the export feature, this plug in is not very useful to me. With the export feature, the plug is off the charts killer.

  7. Ok, when I click on export I get a php file not a csv file. I’m guessing that you want to have people select all and then paste into notepad?

  8. Dear Binny,

    When I view the survey I’ve created in the Firefox, Opera or another browser it looks fine. When I switch to Internet Explorer not all the questions are displayed and the Submit-button is gone. This prevents people from submitting their answers. How can I fix this?

    Kind regards,

  9. I can’t manage to get more than one survey to show up at a time? If you click “submit” on one, it submits them all. Help?

  10. Great plugin. You can’t imagine how much it has helped my website.Thank you so much.
    I’m not much of a programmer but I was wondering about a few things.
    1) Adding a more secure “captcha” submit button.
    2) I’m always worried about hackers and spam. Can the submit form ever be used to gain access to my website.
    Thanks again,

  11. One question. Is there a way to have the survey appear within a page and not a post? I have a client who is wanting a Members’ Survey page (not a post), and inserting the [surveyname] in the page HTML simply returns “[surveyname]”. I wanted to post up the question to see if there is a quick fix before I delve into the code.

  12. I appreciate how easy it was to set up. I do have a feature request, if it’s simply to incorporate. I’d like to be able to send someone to a “thank you page” of my choice, so I can give a little “thank you gift” when they are done. And, of course, I’d like to be able to choose it for each survey and not globally. 🙂 Thanks for the great plugin!


  13. This looks like what I’m looking for. My question is, if visitors want to see the survey results, is there a way that they can see the data, (Like 12 people answered questions #3 yes) or is it only viewable to the admin? I’d like to have everyone who takes the survey see the results- like the silly surveys that keep going around facebook… Thanks for your help!

  14. It’s a great plugin, I like it very much.
    Just have one question on it , that can I output all the questions in one ‘page’ without the [next] button?
    It’s OK if it’s not supported currently.

  15. We installed the survey plugin today and it’s installed and activated successfully, and we were able to create a survey using the survey manager, but nothing appears on the web site even with [SURVEYS 1] entered. We’re using the WP Remix theme. Does anyone know why the survey doesn’t work?

  16. Thanks for you plugin!
    Found an issue on responses.php that some of responses doesn’t have a color assigned in “Votes” column.
    can you look into nextColor() function?

  17. is there a way to put images in the question? it looks like it should work, but the image doesn’t appear.

    thanks! great plugin!

    • A number of people have asked about inserting images into the ‘Surveys’ plugin. I have tried out most of the WordPress plugins, and none seem to be able to do this. When images are added to the ‘Surveys’ plugin, the html code seems to be corrupted and the image will not display.

      However, I have found a workaround. If you install another widget (widget logic), it becomes possible to use the sidebar to display the images. Widget logic gives you control over which images appear in the sidebar in each page. I have used this on my site, and I now have the survey questions with the appropriate images next to them.

  18. I have a client who wants to use the quiz as a method for collecting members. Is there a way to have the sign up form (opt in form) be placed after the quiz page but before the answer page? To see their answers users would need to create an account.


  19. Dear Binny,, I like your plugin and I started using it after adding some touches on the code. I only changed few lines here and there, as I’m not a PHP developer in the first place.

    My changes added the following enhancements:
    1) Added: “Questions Order” functionality
    2) Added: two additional customizable Response fields (beside “name” and “email”)
    3) Admin: Delete all responses in a survey
    4) Admin: Restore all deleted responses in a survey
    5) Front-end: Hiding “Submit” button in all pages except the last one
    6) Front-end: Some Styling touches

    I will be more than happy to send you the changes I made to include them in a future version, if you like them.

    If anyone is interested to try them, just check my blog (

  20. Dear Binny,
    I made another bunch of modifications (in addition to the ones in my previous comment)
    1) The following settings are customizable per each survey:
    a) Include questions in CSV header
    b) Number of questions per page
    c) Send results to email
    d) Survey Introduction (shown before survey, css class defined)
    e) Survey Closure (shown after survey, css class defined)
    f) six customizable text fields to be filled before taking the survey

    2) Introduction text (customizable) and six customizable text fields are shown before the questions page(s) followed by a button to start the survey

    3) Closure text (customizable) is shown after submitting

    4) New button added “Back” to navigate back in questions pages.

    5) Pressing “Enter” key is disabled (to avoid accidental submitting before completing the survey)

    6) Useful links are added in the admin pages, for faster navigation

    7) The six customizable text fields could be CSV exported with responses

    6) Fixed: now “submit” button is no longer displayed with “next” button,, only displayed in the last question page.

    Waiting for any feedback on my blog (

  21. Hi Ahmed,

    Your plugin is best about survey plugins for WordPress. But, when you answer questions, anytime you can submit survey. Therefore, survey is missing in half. You can make that “Submit Survey” buton appears end of survey.
    Very thanks.

  22. I like the idea of this plugin but I cannot get it to work! I have inserted the comment [surveys 1] and and but none of these present the viewer with an option to fill in a survey?

    What I am I doing wrong?


  23. How can I get rid of the text after the survey is submitted? “Hi, There is a new result for the survey at /whats-new/feedback/… Thanks for taking the survey. You input is very valuable to us.
    If you want, you can attach your name to your survey answers. If you want the result to be anonymous, just ignore this form. ”


    • I just went in and changed the text in the source and removed the form. Also, part of the email message was getting outputted to the screen because printf was being used instead of sprintf, so I changed that also.

      There should really be a way in the options to change the text that shows, and an option to turn the form submission off too.


  24. Hi, I love your Survey Plugin. Is it possible to have the Answers next to the question as opposed to the Answers going below the questions?

  25. Does this survey plugin has the option to create a rating question – e.g. rate the following on the scale of 5 etc…..

    thanks in advance.

  26. I used your surveys plugin in my previous wordpress blog site and everything was working perfectly. I created a new blog site today, and installed your surveys plugin. Everything was working fine, except “Export to CSV”. Whenever I clicked “Export” button in Export_choose page, I got HTTP 404 error. Is there anything I need to do prior to install the surveys plugin? The only difference I can tell between two blog sites is the old one wordpress version is older and the site I created today is version 3.0.1.

    Thanks for your help!


  27. Hello, this plugin does what i need, but i want to change the language to dutch.
    I found the default.po file and made a translation to dutch with a po-editor. the mo-file i called but this is not making show the dutch language. In my config file i have “nl” lang configured what makes my site show in dutch.

  28. Sorry. Hope you can address THIS comment as I forgot to check th “Notify me of follup comments via e-mail”

    How can I show the results in a page? Is there any simialr style code, something like [survey-1-results] that I can place on a page to have the results show? Thanks.

  29. I get a page not found error when i click on the export button on the choose export page. i know that all pages are there but still get this error. Any update?


      • I was having the same problem, primarily with Firefox ,and thought the link to wp-blog-header.php was to blame too.

        I found an answer looking at other csv export plugins. I replaced:




        in export.php

        I also altered the headers to:

        header("Content-Type: application/csv");
        header('Pragma: no-cache');

        It’s quick and dirty but it seems to be working for me .

  30. Hi there,

    I added a textarea but when someone is filling out the survey the text stop after X amount of words… How can I fix that?

    Really Urgent

  31. Hello. How do I make the jquery work to check if the user has selected an answer before going to the next page. It doesn’t seem to work in mine. It just goes to the next question/page, even if I did not select an answer and click “Next”.

  32. Hi,
    Great plugin but if i refresh the thank you page, i can keep voting.
    I’m suprised there is no ip or cookie tracking to prevent that.
    Anything you can do ? Because i don’t see how you can trust the results if you know people can easily cheat.

  33. Two problems:
    I have just downloaded the plug-in and I noticed that i can’t export the results. When I press export, it shows me an error url.
    Is there a way to show the name and email of the responder on the notification email? Now it just shows the results.

  34. I am new to wordpress. I tried adding a survey on our website.

    I added the post and in the post, I added the below lines in html text

    The survey is created in Tools->Manage Surveys, the code property for this survey is also showing SURVEYS 2.
    It is not showing survey into my post. I dont know what is missing?
    One additional information:
    When I open this survey post in Mozilla, on status bar is shows done.
    While in IE 8, its shows error as below

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MALN; .NET4.0C)
    Timestamp: Fri, 11 Mar 2011 05:32:59 UTC

    Message: Object doesn’t support this property or method
    Line: 15
    Char: 1
    Code: 0
    URI: http://localhost/wordpress/wp-content/plugins/wordpress-simple-survey/jqueryui1.7/development-bundle/ui/ui.progressbar.js?ver=1.7

  35. Hi Binny, I love the look of this plugin. Just a suggestion though, it would be really great if the visitors to the website could see the survery results too as this adds further interactivity to the application. Is it possible for them to see the reults? thanks again. Peter

  36. Hello,

    Nice Plugin!

    I would like to translate some notification text to dutch. But when I change the text in the language file nothting happens.

    If you’d like I can make a standard translation for you… WIN/WIN 🙂

    Any Idea?

  37. Hi,

    This is a great plugin.

    But, I am having a problem with exporting to .csv.

    I am using WordPress 3.1 and everything is running OK with the plugin until I come to export to .csv. I am getting a 404 error: The webpage cannot be found. The url looks like: (http//???????????.com/wpcontent /plugins/surveys/export.php).

    Can you give me any solution.



    ccI have tI

  38. Can anyone tell me a simple way to get the export to csv to work?
    This is a great plugin but if I can’t export the data I can’t use it.

2 Trackbacks / Pingbacks

  1. Do You Listen to Your “Silent” Blog Followers? | Fuel Your Blogging
  2. Survey plugins - which one to choose?

Leave a Reply

Your email address will not be published.