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.
Looking forward to seeing your latest version. Keep up the good work, it is tough but you are hanging in there!
hi, i’ve downloaded the plugin and would like to try and put it on the sidebar. how do i do that?
You cannot put it in the sidebar in the current version of the plugin.
And can we add it in a static page? If so how the code should be?
Thank you very much,
Maria.
Use the same code – [SURVEYS 1]
I used the code of [SURVEYS 1] in the html format. However, it didn’t show the survey form.
also, i tried to add questions to the survey, i was told it was added. however, it didn’t show anything under questions.
Thanks,
Frank
Hi, I installed the plugin in WP 2.71 and get this error:
WordPress database error: [Table 'wpdb.wp_surveys_survey' doesn't exist]
INSERT INTO wp_surveys_survey(name,description,status,added_on) VALUES('Schoonmakers','Hoe schoon is onze binnentuin?','1',NOW())
what do I do?
Try deactivating and re-activating the plugin. The error is caused because the plugin was unable to create the database table automatically. Could be a permission issue for the database user.
Hmm, did that now I get:
Fatal error: Cannot redeclare surveys_add_menu_links() (previously declared in /var/www/wp-content/plugins/surveys/trunk/surveys.php:17) in /var/www/wp-content/plugins/surveys/surveys.php on line 23
I have created a new version of the plugin – I think the problem is fixed now. Please update the plugin on your site – and let me know how it goes.
Hi, It works now. Thanks…
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 have created a new version of the plugin – I think the problem is fixed now. Please update the plugin on your site – and let me know how it went.
Where can I download the new version, all the links point to the wordpress.org site which is the version from yesterday.
Nothing I can do about it – the wordpress system will automatically switch the version, I think.
Great plugin – thanks.
I’m using it here: http://morecanals.com/fans/health-check
Wondered if there’s a simple way to increase the width of the input text boxes?
Brilliant work – much appreciated.
Binny, I have the same question as Dubber.
I am using your survey here:
http://wordpress.kr-i.com/ask-questions-for-free/
And would like to enlarge the width and height of the free text response box.
Love your work!
Karl
You’ll have to edit the code for that – Open show_survey.php in the surveys folder and change the lines 130-135 according to your needs.
Hi Binny V A,
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’m excited about this plugin. Any ideas?
Thanks,
Jeff Hajek
Just an update.
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
Works great now.
Thanks.
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.
How can I limit the number of times one PC can vote? via cookie or IP.
It’s really important, otherwise the system is easily gamed.
Unfortunately, that cannot be done in the current version. Its a planned feature for the next version.
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=
Hi,
Is there anyway to share one survey on many diferent posts but having responses with the ID of the post?
thanks
cedric
If I want to display the survey someplace other than in a post, maybe the default.php file. Is there a PHP command I can use to call the function? and the survey will appear.
Thank you!
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
can restrict the survey to users who has login to your web?
another question: can you add following data to record, for the users, the answers he has selected?
thanks very much
how to modify this pluign to support other language asia language?
this version can’t recognize chinese character
this pluign is coding by utf8?
Hi, I installed it, activated it, got an error, deactivated it, reactivated it (no error) but I can’t see “Manage > Surveys” anywhere? I’m using 2.8 and I’m new to WordPress. Am I missing something? Thanks!
Try Tools > Surveys in the admin side.
Excellent, thank you – that worked a treat!
I am unable to add a new survey. I get a message You do not have sufficient permissions to access this page. However, I am the administrator.
How can I export the results into a csv file?
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.
Great plugin but how to export as a CSV please ?
Hi
Does anyone know why I cannot see any surveys I create when I return to Manage Surveys? It tells me there are no surveys found and just gives me the option to create a new one.
Using WP 2.8.3
Thanks!
I have the same problem. I create surveys. Then I got back to manage them and they do not show.
Any ideas?
I installed and get this error
[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
If you find/fix, please email me and let me know.
Thank you,
Chad
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.
Do you have any solution ?
Hi,
I search and i see that in MYSQL logs :
Erreur de la base de donnĂ©es WordPress Table ‘xxxxxxx.wp_surveys_survey’ doesn’t exist pour la requĂŞte SELECT S.ID,S.name,S.added_on,(SELECT COUNT(*) FROM wp_surveys_question WHERE survey_ID=S.ID) AS question_count,
(SELECT COUNT(*) FROM wp_surveys_result WHERE survey_ID=S.ID) as response_count
FROM `wp_surveys_survey` AS S faite par require_once, include
I gives all permissions for my admin user on the database… I don’t really understand ..
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 :
Error in database WordPress Table ‘xxxxxxx.wp_surveys_result_answer’ doesn’t exist for request UPDATE wp_surveys_result_answer RA SET question_ID=(SELECT question_ID FROM wp_surveys_answer WHERE ID=RA.answer_ID) made by activate_plugin, do_action, call_user_func_array, surveys_activate
And i also have a page with “You do not have sufficient permissions to access this page.” However, I am the administrator and have all the permission in the database.
I really don’t understand the problem ?? It seems to make a request upadte data in wp_surveys_result_answer table whereas i could not open plugin page to edit any survey!!
Could you help me ?
thanks,
Denis
The plugin has some compatibility issues with WP 2.8 – But I’m too busy to fix it right now. I’ll work on it as soon as I get some time.
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.
Using WP 2.8 I can create surveys and embed them. When I go back to manage surveys there are no surveys showing.
Any idea what the issue could be? Seems like at least one other person has the same issue.
Thanks.
How can I translate the survey plugin ?
Where I have to put the .mo file ? And what name should I use for that .mo file ???
Thank you
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.
if you cant support why are you creating one plugin in a day! Create one and do it right and give good support. no language support, no answers on forum, no future wp version support.
“You do not have sufficient permissions to access this page.” bah you too
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).
Remember that we release plugin for a community an for
free.
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.
@Mat, nithin
Thanks for the support guys. I meant to update the plugins – but I’ve been so busy with my work and some other stuff that I did not find the time. But I will – someday soon.
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?
Found the issue with the plugin. Turns out there was a conflict with another plugin called Advanced Excerpt.
Thanks for a great plugin Binny V A! Appreciate all your hard work.
I installed and created a survey fine, but after I put in [SURVEYS 1], publish, and view my live blog, the survey is not showing up. Can you please let me know why this is happening?
Hi Binny,
Great job, works perfect for me 🙂
A question thought: where can I modify the “Thank you” text after one has completed the survey?
Thx
Its in the show_surveys.php file.
Cheers, mate!
Is it possible to provide the user with the results of the survey when they finish the survey?
Are their any options to save the email name in a data base?
Hi Binny,
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?
Thanks much,
Michelle
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.
QUOTE: You can let the visitors take surveys and see the result from the admin side. ENDQUOTE
How can I fix it so the visitors can see the results?
Another bug, plugin not working with MySQL 5.1. You get this error when you try to add a question and no the question is not added to the database. Using WP 2.9 with MySQL 5.1
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=
</strong
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.
Hello Binny. I try to “Add New Answer” – javascript:newAnswer() – in New Question but its not work. WordPress: 2.9.1. Plugin: 1.0.1.6. Thanks.
Hello again Binny. I try “Add New Answer” in localhost (EasyPHP) and not work, but I install plugin in my site and its works fine. Great plugin.
Binny,
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 ?
2. What formats can you output – eg .XLS ?
1. You can ask any kind of questions – you can even use HTML in your questions. I hope that is what you are looking for
2. Plugin outputs CSV – it can be opened in Excel.
Hey Binny,
Thanks a lot, great plugin and very well written/commented code.
One question – If on submit, I wanted to make sure the user has answered all questions (entered answers/hecked checkboxes), which file should I edit to add the validation? survey _action.php??
Thanks a lot.
If you want just JS validation, use script.js. For server side validation, use show_survey.php
^^Hey Binny, I tracked it down to function e(..), which calls the function _e in wpframe. I don’t know where this goes though?