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.
Usage/Screenshots
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…
Aggregate
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.
Feedback
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.
Thanks for this plugin, Binny! It’s really easy to use.
I’ve got it running on my blog for a survey on the Texas Tech/Oklahoma game this weekend. Some feedback and questions:
1) Being able to force an order of the questions would have been nice. They didn’t come out in the order I put them in; neither were they alphabetical.
2) If you only have on question in the survey, it would be nice if only one click were needed.
3) Does it place any sort of limit on the voting by individuals?
1) That’s odd – it works out correctly for me. Anyway, reordering questions is a feature I will add in the next relase – that should fix the problem.
2) Good point. I actually have another plugin – Pollin – that is used for single questions cases. But I’ll add that feature to the Surveys as well.
3) This limit exists in the Pollin plugin – again, I’ll add it to surveys as well.
Thanks for the feedback.
When I click Manage Surveys, I get two boxes:
Name the Survey and Description.
I type those in, click on Save and all I get is a blank page on survey_action.php.
Any Ideas?
I had to signup for a ConstantContact account inorder to host a survey for my higher secondary investigatory project.
This one is an awesome release.
I hope you’ll put up a poll with the “pollin” plugin to select the favourite plugin out of those released this week.
Great plugin this will come in very handy on my blogs.
Installed your plugin v. 1.00.1 on WP 2.5.1/Linux/GoDaddy
When I click on New Survey, then Save, I get a “Nothing found” error on plugins/surveys/survey_action.php
Any ideas?
I love using the plugins.. π
Nice one.
Love the concept and simplicity of this plug-in, however my first test was a simple single question survey. When inserting the comment:
into a post or a page I see nothing in the WordPress page. Using the current version of WP.
we waiting for you.
we love you and we love your plugins.
is there a way to add pictures?
@matt
Yes, you can add images in the question easily. It can be added in the answers too – but you have to know HTML to do that.
Hi
This looks to be a most useful plug-in.
Unfortunately I seem to be getting 2 votes recorded for each single vote so the results are in effect doubled.
Currently running word-press 2.6.3. under MAMP PRO on my Macbook Pro.
Any thoughts?
I fixed the bug with
change line 10 in survey_action.php from:
$_REQUEST[‘submit’]==’Save’
to
isset($_REQUEST[‘submit’])
all in the if statement
Not everyone uses English π
Great plugin!
Sorry, after “with the” insert “blank page on survey_action.php” in my comment π
@spine
Thanks for the fix – it will show up on the next release.
btw do the same in line 8 in questions.php
unfortunately I still have another bug: my questions won’t get displayed in the acutal post. I do get the “next” button but no questions or other information.
I guess it still has something to do with the language dependant code.
Spine, I get the same issue on my blog I can see the next button but my questions won’t show up for some strange reason.
Any help would be greatly appreciate Binny and thanks for a great plugin if I can get it working I’ll do a quick youtube video about it… π
great stuff
This is apparently broken in the latest version of WP
@Chris Orbz
Latest as in 2.7 or 2.6.5 ?
I’m using 2.6.3 and it isn’t working for me at all…
I use WP 2.7 (and 2.6.3) , but can’t add question’s in my survey :'(
Hi, I want to use the survey, but for some reason he does not show the survey in the order I want to show it.
For example in admin:
Question 1
Answer 1, Answer 2, Answer 3
Is shown as
Question 1
Answer 1, Answer 3, Answer 2
What is the solution for this?
Thnx
@LJ
I am working on a fix for this problem – it will be included in the next release.
It doesn’t work for me either. When I click on Manage Surveys on my dashboard, it immediately takes me to my site where there is a 404 error. I haven’t upgraded to 2.7 yet.
I have alot of the above problems.. out of order questions etc. But when I tried to show the indvidual response it just repeated the data form the first one over and over for the various dates adn times the form was filled out.
Also FYI… when I deleted a survery I got two error messages on deleting the database. I did not copy them sorry. But if you try the same thing you might get a clue as to what some of the probems might be??
How do you install the survey on your blog after you create it
I cant find any where to get the HTML code for the survey
to install it on the blog
Help
@Allan Fine
Got to the page where you can add the questions to the survey. The HTML code to insert into the post will be shown at the top..
Probably will work…
? it doesnot show the code. maybe this works… the code is shown on the site.
anyway use
I would love to be able to have multiple-check items in the survey, rather than just single-answer questions.
I would also like to be able to allow text entry as a question, so people can add comments, or to allow you to ask open-ended questions, such as “Why don’t you buy all your groceries from XYZ shop?”.
This is a feature that has been planned for the next release.
I got some stupid Division by zero errors..
what did i wrong…
check this url for screen shot..
http://s5.tinypic.com/2rmbg60.jpg
Thanks for reporting it – I have fixed the bug. The fix will be available in the next release. If you can’t wait, shoot me a mail and I’ll send you the latest version of the code. My email address is binnyva, gmail.
This is a great find. Thanks. I was looking for a surveys plugin so I can run mini polls. I’ve got a couple of other ideas I can move forward with now.
I just love playing about with plugins, even though half of them I never end up using, it’s all the big learning curve.
Have a great day! I’ve bookmarked you now.
Thanks for your feedback. I’ll see if I can add this feature in the next release.
I am about to give up and delete your plugin as it DOES NOT work for me.
I created a survey with 4 questions. When I added this line:
in the post and save it, the line are being replaced by this:
.
And yes I was in HTML mode in the post.
When I view the post it only shows
By the way: On this page you say to use , on the survey question page it says: .
I have tried both. What’s right?
The correct method is [SURVEYS 1] – the other method is old.
The lines disappeard from my last submitted question coz I forgot it takes HTML. Hence same question one more time.
I am about to give up and delete your plugin as it DOES NOT work for me.
I created a survey with 4 questions. When I added this line:
“”
in the post and save it, the line are being replaced by this:
“”
And yes I was in HTML mode in the post.
When I view the post it shows:
“”, remark the automatic added space before the exclamation mark.
By the way: On this page you say to use “”, on the survey question page it says: .
“”
I have tried both. Whatβs right?
html removed again. Nevermind. I give up. π
I put in [SURVEYS 1] as you said, but it still doesn’t work. I only get the result as text. Here is the link to the post I’ve made: http://trana.as/2009/04/test
I does not work for me. My problem is same as is with the guy above me.
It does not show servey, but the text itself
I just dropped the plugin. It doesn’t work
Hi,
I think I’ve uncovered several bugs in version 1.00.1 of the Surveys plugin (a clean install on WP Version 2.7.1), two of which are minor and one of which causes data corruption.
1)
When looking at the individual responses (individual_responses.php) the link to “All Responses” does not go back to the right survey. The
ID?>
statement on line 67spits out the wrong ID as it returns the ID of the last respondent and not the ID of the survey. Perhaps usingwould fix this.
2)
When looking at the individual response (show_individual_response.php) the wrong responses get displayed. This may be due to the
WHERE A.question_ID={$q->ID}
statement on line 20. From what I can tell this ties the question to the answer just fine but completely forgets to tie the answer to the respondent. I would venture that this linking is designed to be achieved with the wp_surveys_result_answer.result_ID field. This would be easily fixed by adding an appropriate AND to the WHERE clause.3)
Now here comes the clincher: The wp_surveys_result_answer.result_ID field does not get populated with the respondent ID field but with the survey ID (ref line 19 on show_survey.php). So there’s no way to tie back the responses to a respondent. And now we have a big problem since we can’t display, edit or delete individual responses from a survey.
IMHO that last issue is a bit surreal for a plugin whose sole purpose is to manage surveys.
I hope this helps improve the code and reminds people (including myself) that failure to properly test can break your reputation in a heartbeat.
Thanks for the feedback – most of the problems have been already fixed. The new version will be released shortly. If you want the latest version, get it from http://projects.binnyva.com/forum/viewtopic.php?f=14&t=317#p648
Whoosie… some things went missing in the post…
Point 1) should state:
The “$survey->ID” statement on line 67spits out the wrong ID as it returns the ID of the last respondent and not the ID of the survey. Perhaps “$survey_id” using would fix this.
Hi! Binny,
Yesterday i installed your plugin on my site. I have posted 3 questions in the survey, On first page i’m seeing all 3 question on same page along with next button on pressing next i’m seeing 2nd question as expected and thereafter the plugin is working fine. Please guide.
I’m using your plugin version 1.01.0.
Wordpress version: 2.7.1
Regards,
Ritesh
Go to admin > Settings > Surveys Settings and set the number of questions per page as 1. That should fix the issue.
Hi,
I installed your plugin and on adding the first survey (hitting ‘Save’ on /edit.php?page=surveys/survey_form.php&action=new) I get:
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s plugin’,’1′,NOW())’ at line 1 for query INSERT INTO wp_surveys_survey(name,description,status,added_on) VALUES(‘Survey Test’,’Testing the Surveys plugin’,’1′,NOW())
This is on survey_action.php. I’m using MySQL 5.1.
That’s really odd – I don’t have this error. Anyway, I’ll take a look into this.
Hi Binny! Thanks for taking time to develope and share this plugin!
I’m having difficulties from the beggining π
When clicking ‘Survey Settings’ I get this error:
Warning: require(/var/www/sites/domain.com/blog//wp-content/plugins/surveys/options.php) [function.require]: failed to open stream: No such file or directory in /var/www/sites/domain.com/blog/wp-content/plugins/survey/surveys.php on line 56
Fatal error: require() [function.require]: Failed opening required ‘/var/www/sites/domain.com/blog//wp-content/plugins/surveys/options.php’ (include_path=’.:/usr/local/lib/php’) in /var/www/sites/domain.com/blog/wp-content/plugins/survey/surveys.php on line 56
What could this be? Cheers!
Thanks for the feedback – I have not yet seen this error. I’ll take a look.
I solved this one Binny! Thanks anyway! The path was wrong :-s