Thursday, 3 October 2013

Hiding the “Save and Close” button in Sharepoint 2010 and Sharepoint 2013

To hide the “Save and Close” button:

  1. Go to your designer
  2. On the left side click on “All Files”
  3. Go to lists –> Select your survey-> And click on it.
  4. You will have the following pages (we only need to update two)
  5. Right Click on NewForm.aspx->Open With->Sharepoint Designer(Open as text)
  6. Find the following line (section) : <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
  7. Copy this code below:
    <script src=""></script>
    $(document).ready(function () {
        $(":input").each(function () {                                   
    	var _sInputValue = $(this).val();                                        
    	if (_sInputValue==="Save and Close") $(this).hide();

  8. Go to you NewForm.aspx on the designer, right click and “Check Out” and then “Check In”

  9. Do the same with EditForm.aspx