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”
    image
  3. Go to lists –> Select your survey-> And click on it.
  4. You will have the following pages (we only need to update two)
    image
  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="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script>   
    $(document).ready(function () {
        $(":input").each(function () {                                   
    	var _sInputValue = $(this).val();                                        
    	if (_sInputValue==="Save and Close") $(this).hide();
        });
    });
    </script>

  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

10 comments:

Anonymous said...

Thank you, it works!!!

Anonymous said...

Works! Great solution!

Anonymous said...

All I can say is, you rock!!! I'm not a 'coder' and was able to do this based on your instructions. It works!!! Yay!!! Thank you!

Unknown said...

Thanks a lot, it work to hide 'save and Close' button. I want to confirm if I can use the same script to hide 'Cancel' button?

BejeweledOne said...

How would you modify this to completely hide the top row of buttons in the survey (there is a top row and a bottom row) and continue to hide the 'Save and Close' button on the bottom row?

Anonymous said...

Awesome thank you!!

Anonymous said...

It works magic. Thank you!!!

Anonymous said...

Thaaaaaaaaaaaaaaaaaaaank you! Works perfect

yanmaneee said...

yeezy shoes
off white
hermes birkin
giannis shoes
lebron 15 shoes
kobe 9
off white shoes
retro jordans
golden goose outlet
moncler coat

neadiez said...

news best replica bags Get More Information Ysl replica bags you could try these out buy replica bags online