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.

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.

I get the same error on 2.7.1 as well, I’ve deactivated and re-activated the plug in. Its not a permissions issue, the database user has all privileges. I really like this plugin and would like to use it, but need to resolve these errors.

I tried to install you survey, but get a 404 error when I create a new survey. I suspect it has something to do with moving my site’s URL location to the root directory (sorry-I am sketchy on the details of what I did or how I did it (it’s been a while)–i just set it so the URL appears to come from my root domain instead of my install folder).

I got this working by tinkering with the code. Basically, I just kept searching the php files for references to “wp-admin” or similar directories, and adding in my own directory. Eventually I hit on the right combo (can’t quite recall which files had the magic touch), and got it working

I started experimenting with your Surveys plugin in WP 2.7 and ran into problems when assigning questions. Turns out the problem was your use of short php tags in a couple of places in the question.php file. If you do a search for those short php tags and replace them (don’t remember if there were two or three), it so far seems to work in 2.7.

I was wondering if you could help me figure out what the following error means?

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 ” at line 3]
SELECT Q.ID,Q.question,(SELECT COUNT(*) FROM wp_surveys_answer WHERE question_id=Q.ID) AS answer_count FROM wp_surveys_question AS Q WHERE Q.survey_id=

I attempted the plug-in on my site but was un-luckily did not suceed fully.I will require your help in achieving success.I followed procedure as given but did not succeed?Is the survey ok with word-press version 2.8.
I uploaded content to /wp-content/plugins/folder activated the plug-in and then went to settings and clicked on surveys setting which resulted in to following error message. pls respond.Thanks.

Warning: require() [function.require]: Unable to access /home/vhosts/technical-world.freevar.com//wp-content/plugins/surveys/options.php in /home/vhosts/technical-world.freevar.com/wp-content/plugins/surveys.php on line 56

Warning: require(/home/vhosts/technical-world.freevar.com//wp-content/plugins/surveys/options.php) [function.require]: failed to open stream: No such file or directory in /home/vhosts/technical-world.freevar.com/wp-content/plugins/surveys.php on line 56

Warning: require() [function.require]: Unable to access /home/vhosts/technical-world.freevar.com//wp-content/plugins/surveys/options.php in /home/vhosts/technical-world.freevar.com/wp-content/plugins/surveys.php on line 56

Warning: require(/home/vhosts/technical-world.freevar.com//wp-content/plugins/surveys/options.php) [function.require]: failed to open stream: No such file or directory in /home/vhosts/technical-world.freevar.com/wp-content/plugins/surveys.php on line 56

Hi Binny, I’m getting the same error as Tom above – “You do not have sufficient permissions to access this page.” This happens once I click on the “Create New Survey” link on the “Manage Survey” page. I trying this on a local installation of WordPress on Windows & Apache.

[Sat Aug 22 19:23:06 2009] [error] 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 ‘=’ at line 3 for query SELECT Q.ID,Q.question,(SELECT COUNT(*) FROM wp_surveys_answer WHERE question_id=Q.ID) AS answer_count\n\t\t\t\t\t\t\t\t\t\tFROM wp_surveys_question AS Q\n\t\t\t\t\t\t\t\t\t\tWHERE Q.survey_id= made by require_once, include

Hi binny,
I’m using 2.8 and I’m new to WordPress.
I’m getting the same error as Tom above and Nithin – “You do not have sufficient permissions to access this page.” This happens once I click on the “Create New Survey” link on the “Manage Survey” page. I trying this on a local installation of WordPress on Windows & Apache.

Hi,
I resolve my first problem : the database was not created when a activate the plugin. I try to delete a reactivate plugin with the wordpress plugin administration and the database was not created. I decide to download the plugin then install it! and it works, the surveys database is created!!!!!!

Now i have this problem when i want to create my first surveys with “create new survey” link :

I didn’t actually solve the problem on my local machine, but went ahead and deployed the survey on our actual site(running WP 2.8.4) and it worked just fine (http://tidycity.org/blog/survey). Indicates some problem with my local windows/wp installation. Suspect same in your case.

I see the export to csv question came up a couple of times, any plans to address this in the future?

FYI: I copied all the results and pasted them into an excel file. Excel was able to assign the data to all the individual cells pretty nicely, but I’m no excel expert. That’s as far as I went. I would imagine someone who knew excel fairly well could use that to generate whatever they needed.

Hey guys, don’t be hard with him.
Some of yours comments show me that you dont understand that even if a dev release a plugin, it doesnt mean that he has a full time to work on it.
More of us have a job too and yes, we prefer to spend time to work for money and earn our food than work for
free.
I’ve made a lot of modifications to this plugin and i was going to releasr them but when i read the last comment by example, i dont want to.

Now, you want a feature that isnt there? Ask gently and wait for it.
You really need it? In a hurry? Pay for it. Im sure he will be please to work with you, or find a dev that has time (you have my website).

Totally agree with Mat there; if you have issues with the plugin you either (a)try and fix it yourself (b) politely ask for assistance – remember it’s free assistance, so don’t behave as if you are entitled to it (c) stop using it and look for alternatives – nobody is forcing anyone to use this.

Plugin is working for me, but it’s not showing the radio buttons/check boxes on the home page. It only shows in the post. I did a little debugging and show_survey.php seems to be fine. Could WP be filtering this out somehow?

Thanks so much for creating this plugin. It’s awesome and seems designed to do what I need.

Just one question: On some questions I have an “other” response and then activate the text input field is available for survey takers to specify what they mean by “other”. But it appears that they must click the radio button next to the text input field in order for me to see what they input. Is there anyway to have the text in the text input field automatically collected with the results or have it automatically collect if the “other” radio button is selected?

One more thing… the answer options are appearing out of order on my survey. For example the choices are 0-18, 18-32, 33-45. But instead it shows up to the user as 18-32, 0-18, 33-45. Any way around this problem? Thanks.

Hi Binny, I came across your plugins: eventr and surveys. I will install and use over the weekend. Just wanted to say thanks. Also, I wanted to invite you to be a guest tech writer from time to time on perhaps answering questions and/or suggestions that you may have on your mind.

Harlem Talk Radio is the site and we launched it May of 2009. Please have a look and let me know what you think.

1. What types of question can I ask ? (I’m comparing your plugin with surveymonkey’s question types) I would very much prefer to use a plugin than survey monkey’s service so it would be good if you could do what they do ?