none
Need custom buttons on Default List forms RRS feed

  • Question

  • Hello Everyone, There is a requirement  to add custom button as Save as Draft on list's New item form. on click of that status column of list to be updated.Kindly advice me to achieve that. 
    Thursday, March 9, 2017 6:38 AM

All replies

  • Hi,

    We can use jQuery to add the custom buttons on the list new item form. Please check the following code and add the code into a content editor web part in the new item form page.

    <script src="http://code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function(){		
    	$("input[id$='SaveItem']").before("<input id='ApplyNewItem' type='button' onclick='draftItem()' value='Apply'/>");	 
    });
    function draftItem(){
    	alert("Test");
    	//add your code to do something
    }
    </script>

    Best Regards,

    Dennis


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

    Friday, March 10, 2017 2:05 AM
    Moderator
  • Can the "onclick" run a nintex workflow?

    Thanks! Patti N.

    Thursday, February 28, 2019 10:09 PM