0

I want to hide the "Save" button in the pop-up window which appears when we add new item.

I tried using javascript getElementById to hide in NewForm.aspx page but it didn't work.

Update: I executed the following code, but didn't work.

<script>
    $(document).ready(function(){
        $(".ms-cui-ctl-large .ms-cui-ctl-largelabel:first").text("Request");
     });
</script>
2
  • Is there a reason you are giving people the option to add a list item but then denying them the ability to save it? Is there some other process doing the save?
    – Dave Wise
    May 10, 2013 at 18:27
  • @DaveWise I am using the NewForm.aspx button to be "Request" not "Save". So I changed the button below. But I am not able to change the Ribbon Button "Save". Either I want to hide it or change the text to "Request"
    – Gravity M
    May 10, 2013 at 18:34

2 Answers 2

2

I found a way to hide the save button.

<style>
#Ribbon\.ListForm\.Edit\.Commit
    {
        display: none !important;
    }
</style>
0

Assuming you have jQuery included (and who doesn't these days!) it is simply a matter of executing the script below on the NewForm.aspx page after the ribbon is built.

jQuery(".ms-cui-ctl-large .ms-cui-ctl-largelabel:first").text("Request")

If you need a server-based solution, there's also this article from Microsoft.

5
  • I have updated my question. I tried but it didn't work.
    – Gravity M
    May 10, 2013 at 19:09
  • You added the javascript code to newform.aspx, and not the list view page, correct?
    – Dave Wise
    May 10, 2013 at 19:19
  • Yes, I added the script to NewForm.aspx. Not to the list view
    – Gravity M
    May 10, 2013 at 19:20
  • fwiw, I have had occasional issues using the $ token for jQuery in SharePoint, which is why I use the full name of jQuery(...) instead
    – Dave Wise
    May 10, 2013 at 19:22
  • It didn't work as well. But I hide the commit group. Thats all I wanted. I have added my answer.
    – Gravity M
    May 10, 2013 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.