Quick and Easy SharePoint Surveys

Have you ever created a survey on a SharePoint Portal Area and found that your users are not able to fill it out? Basically this is due to how permissions are handled differently between SharePoint Portal and WSS. In WSS you can specify permissions for each list (or survey in this case) whereas in the portal you are only able to grant permissions to the entire portal area.  I've seen some people create an entirely separate area for their survey in order to manage permissions. I've seen others use the wss backdoor to specify different permissions for a survey in the portal, even though the portal interface doesn't support it. 

I believe even more users create a portal listing that directs the end user into the WSS site, which makes the end user then have to click the respond to survey button in order to fill out the survey.  Then many also hack the survey to add a submit button to the bottom so that the user doesn't have to scroll back up to the top to submit it.  Once the end user has submitted the survey, they are lost and are not easily able to navigate back up the the portal area they left.  Needless to say, this is more cumbersome than it really should be.

As a solution , I started to create a new webpart that would display the survey form elements at the portal, and allow that webpart to submit the results to the survey list.  However, my good friend Bil Simser pointed me in the direction of Infotech Canada and their EasyForms webpart, which is exactly what I was about to create. EasyForms allows you to create a survey or any other list and display the entry form anywhere, including the Portal.

To create a quick survey, start with the WSS survey itself.  In this example I've created a survey with just one question… "Do you like Easy Forms?"  with a choice of Yes or No.  I've also made the question require a response.  A word of warning — I've found that sometimes if I use EasyForms without setting at least 1 question/field as required, the form will occasionally appear to work, but the actual answers are not saved.

Once you have the survey created, you can add the EasyForms webpart to a webpart page and configure it.  The first section of the task pane allows you to setup the basic connection to the survey or list.  You can choose to use the existing site or type in the address for any other site.  Once you've selected the site, select the survey or list that you want to use.  This will populate the fields list boxes and allow you to choose to show all the fields / questions, or just a select few of them. Questions or fields requiring a response can not be removed from the display.

You can also choose whether the responses are added as the actual user, or if a specific user account should be used to save the results.  The users that you are allowing to save the form must have reader access to the site as well as add rights to the list or survey.

Once the connection to the list has been created, you can customize the look and feel of the EasyForms webpart itself.  The task pane has an in-line stylesheet editor which opens up a dialog box with the full stylesheet used for the webpart. You can edit this stylesheet to perform any CSS customization to the webpart that you see fit.

You are also able to define what happens when the user submits the form.  When the form is submitted successfully they can either be sent to another page through the Success URL or just be shown a Success Message.  You can also specify what the text of the submit button will be.

The last part of the customization allows you to show an introduction message that appears above the rest of the form as well as a hyperlink to the list or survey that the webpart is connected to.

Once this customization is complete the webpart will display the form with each question or field being displayed with the proper type of form input controls that are required for the list or survey that it is connected to.

If you don't direct the user to another page when the form is submitted successfully, they will see the Success Message defined in the task pane.

One thing I like to do is to only allow users to enter the survey once.  You are able to accomplish this by using the survey functionality and setting the survey options to not allow multiple responses.  If the user tries to submit the form twice, they will see a friendly error stating that they are not allows to respond again to the survey.

For the price of the web part, I find it a perfect solution for allowing input from general portal users into any list or survey hosted within a WSS worksite.  This helps keep the navigation simple for the general end user, as well as giving you more functionality at the portal level.  To add even more functionality I've also added a DataView web part to the same page.  This gives you the ability to give the end user immediate feedback as to the results of the survey or list.

kick it on SharePointKicks.com

Leave a Reply