SharePoint survey and incomplete results

Is very easy to create SharePoint survey by the end users. Normally it covers all requirements, but there is only one minus. Very often, users click “Save and close” button instead of the “Next”, which creates incomplete results. Out of the box, you are allowed to see only complete results and only incomplete results created by you. That’s why I think is a very good idea to hide “Save and close” button and force users to complete all the questions. Definitely we can have some help from JavaScript.

function pageLoad() {
    var buttons = document.querySelectorAll('input[type="button"]');
    for(var j = 0; j < buttons.length; j++) {
        var button = buttons[j];
        if(button.value === 'Save and Close') {
   = 'none';

Place this code in a text file, upload it on the server and display the content using a content editor web part you place on the page. Because you include everything in “pageLoad” function it will be executed when page is loading or after a postback.


Author: anvlpopescu

Nothing special to say. I'll think about it more and let your know.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s