Wednesday 9 November 2011

Hide Save Button in SharePoint Survey

 

Hide Save Button in SharePoint Survey which is off no use....

  • To go edit page setting place ?PageView=Shared at the end of the URL...

  • Add web Part

  • Select Content Editor Web Part

  • This webpart should be added to all the question displayed on different pages...

  • In Source Editor Paste the below code.... inside javascript tag place this below code..


  • _spBodyOnLoadFunctionNames.push("setValue");

    function setValue() {
    hideButton("Save");
    }

    //This function hides a button on the page
    function hideButton(valueDef){
    var frm = document.forms[0];
    for (i=0;i< frm.elements.length;i++) {
    if (frm.elements[i].type == "button" && frm.elements[i].value == valueDef) {
    frm.elements[i].style.display = "none";
    }
    }
    }

    No comments:

    Post a Comment