Monday, April 1, 2013

How to Customize/Replace the “You are not allowed to respond again to this Survey” SharePoint 2010 Survey Message


Survey Questions can be easily created on SharePoint 2010, where it is often required that no user fills the Survey twice. This can be easily achieved in OOB (Out of Box) fashion.

But the problem is that user sees the error message like the one shown below (Pic 1) which will definitely not look good on your Site and there is no easy way to change this.

There are many ways to fix this issue but the approach which i applied was on the client side Ecmascript method. As shown in the image on left we will be performing the following tasks.

  • Create a Link to Survey Question.
  • Include a CEWP on the page where the image having link to survey question will be shown.
  • The code in CEWP will checks if user has responded to survey earlier
  • Based on response Show either "Thanks for feedback :Image 2" or "Fill the Feedback: Image 1"
Ok so before we start this was the Error message we get if a user tries to fill the Survey again.(OOB way) but we dont want this screen to appear
How to get the Link to Survey Questions
  • Open the Survey List and get the code for replying to survey as shown below
  • Copy the code in a Notepad file. This will be looking somewhat like the below code.

  • Now add the CEWP to the page where you want the user to click on the Image to Fill up the Survey. I have shown the below image as the link to survey in my example.
  • The image we will be showing after the user fills up the survey is (This image will not have any hyperlink)
  • So to do this transition we will put the below code in the CEWP










Budget Submission

So we will now never get the error message that the user has not registered becuse if the user is already registered then we will not show the hyperlink to the survey questions..