none
How do you rename the Save button that appears in the ribbon when opening a new for in Infopath form?

All replies

  • Please change the following css


    Abenet

    Thursday, October 26, 2017 3:36 PM
  • Try this

    http://www.c-sharpcorner.com/blogs/renaming-save-or-cancel-button-text-on-sharepoint-list-forms1

    Thursday, October 26, 2017 3:37 PM
  • It is important to note that I don't want to change a button the form.  I want to change the OOTB button that appears in the Ribbon of a new form.  See screen shot.
    Thursday, October 26, 2017 3:59 PM
  • Thanks..  Where is that css code?
    • Edited by betcha663 Thursday, October 26, 2017 7:39 PM
    Thursday, October 26, 2017 4:01 PM
  • Hi,

    Here is a solution for your reference.

    First, click edit page.

    Second, add a “Script Editor” web part.

    Third, click “EDIT SNIPPET” to insert some JS code.

    Fourth, insert JS code.

    The full JS code as below, you can use it directly.

    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js"></script> 
    <script type="text/javascript">
    $(function(){
        $("span[class='ms-cui-ctl-largelabel']:contains('Save')").text("Submit");
    });
    </script>
    

    Last but not least, click “Stop Editing” to save your changes.

    Then you will see the result:

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, October 27, 2017 5:45 AM
  • Thanks Lee.

    The menu option doesn't appear by default when the new item opens.  Only after I click 'Browse' the 'Edit'  menu option appears and the button still says 'Save'.

    Here's what I did:

    • Clicked on New Item in List
    • Clicked 'Edit Page' under Settings
    • Added a Script Editor Web part
    • Inserted the JS Code provided above
    • Clicked Stop Editing

    This is what I see when I create a New Item afterwards:

    Not sure why this is happening.  It appears to be working for you as per your screen shots above.

    Friday, October 27, 2017 2:25 PM
  • Hi,

    Please try refer to the code below, I have tested successfully in a InfoPath view.

    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 
    <script type="text/javascript">
    function show(){
        $("span[class='ms-cui-ctl-largelabel']:contains('Save')").text("Submit");
    
    }
    
    function clickEdit(){
        $("a[class='ms-cui-tt-a']")[1].click();
        window.setTimeout(show,1000);
       
    }
    
    function startFun(){
        $("div[lang='en-US']").click(); 
        window.setTimeout(clickEdit,1000);
    }
    window.onload=function(){      
        window.setTimeout(startFun,1000);
          
    };
    </script> 

    Screenshots of result:

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by betcha663 Monday, October 30, 2017 3:20 PM
    • Unmarked as answer by betcha663 Monday, October 30, 2017 6:18 PM
    Monday, October 30, 2017 10:33 AM
  • Thanks Lee.  That works.  But through testing I did find instances when it doesn't.  See above comment - **Found the following issue while testing**

    In addition, is there any way to change the button help message that appears when you hover over the 'Submit' button?

    To perhaps change that the word 'Save' to 'Submit'?


    • Edited by betcha663 Monday, October 30, 2017 6:40 PM
    Monday, October 30, 2017 3:20 PM
  • **Found the following issue while testing**

    It seems that the Edit menu appearing and button changing to Submit is triggered only when you click into a field on the form.

    If you just create the new item and do nothing the Edit menu does not appear.

    Also if you wait about 5 or 10 seconds after you create a new item then click into a field, the Edit menu option appears (not expanded) and the Save button name is not changed to Submit (you have to click on the 'Edit' menu option to view the buttons).

    Is that the normal behavior or is there a workaround to make it always work?




    • Edited by betcha663 Monday, October 30, 2017 6:18 PM
    Monday, October 30, 2017 6:05 PM
  • Hi,

     To rename your Save button in the ribbon, you have to use setInterval instead of setTimeout. 

    Tuesday, October 31, 2017 1:48 AM
  • Hi,

    I'm sorry for the previous mistakes, please try the code below and I have made it always work!

    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 
    <script type="text/javascript">
    var iCount;
    
    function change(){
        if($("span[class='ms-cui-ctl-largelabel']:contains('Save')").length>0){
            $("span[class='ms-cui-ctl-largelabel']:contains('Save')").text("Submit");
            clearInterval(iCount);
        }
    }
    
    window.onload=function(){  
        
        iCount=setInterval(change,300);
    };
    </script>

    Screenshots of result:

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, October 31, 2017 9:57 AM
  • Thanks again Lee..

    The 'EDIT' menu option appears but the button options are not visible unless you click on 'EDIT'.  

    You have to click on the 'EDIT' menu option to view the buttons. 

    Is there a way to have the buttons appear by default instead of having to click on 'EDIT' to see them?

    • Here's what I see initially fter creating new item:

    • Here what I see after I place my cursor in any field:

    • It is only after I click on 'EDIT' I see the buttons:

    Is there a way to see the buttons by default instaed of having to click 'EDIT'?

    Tuesday, October 31, 2017 6:31 PM
  • Hi,

    Here you go:

    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 
    <script type="text/javascript">
    var iCount;
    
    function change(){
        if($("span[class='ms-cui-ctl-largelabel']:contains('Save')").length>0){
            $("span[class='ms-cui-ctl-largelabel']:contains('Save')").text("Submit");
            clearInterval(iCount);
        }
    }
    
    function clickEditTab(){
        if($("a[class='ms-cui-tt-a']").length>0){
            if(!$("span[class='ms-cui-ctl-largelabel']:contains('Submit')").length>0){
                $("a[class='ms-cui-tt-a']")[1].click();
            }
        }
    }
    
    window.onload=function(){  
        
        iCount=setInterval(change,300);
        setInterval(clickEditTab,500);
    };
    </script>

    If this is a new question, I would suggest you post it in a new thread, it would make others easier to focus on one question in one single thread and it will benefit other community members who stuck with the same question.

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Wednesday, November 01, 2017 9:59 AM
  • Thanks Lee.  That worked!

    Here's what I did:

    • Clicked on New Item in List
    • Clicked 'Edit Page' under Settings
    • Added a Script Editor Web Part (or you can use a CEWP)
    • Inserted the JS Code provided above
    • Clicked Stop Editing

    To Test:

    • Create New Item
    • Place cursor in any field at any time

    The buttons appear under the EDIT menu at the top:

    Wednesday, November 01, 2017 6:25 PM
  • I just realized there is an issue with the code above.  Its not while working with the form but rather when/if you want to modify the form again.  I tried to edit the CEWP via Edit Source that appears in the menu but it quickly disappears.  In fact it is difficult to click on any other tab in the menu because it quickly switches back to the 'Page' menu.

    I can't even get the menu on the CEWP to Delete it.  It quickly disappears!

    It looks like the code supplied above also triggers when you try and modify the design of it via the List menu -> Form Web Parts.  Is there any way to avoid it triggering in design mode?


    • Edited by betcha663 Friday, February 09, 2018 9:58 PM
    Friday, February 09, 2018 9:54 PM