Let's learn the tricks which you can use to customize SharePoint default Add/Edit forms.
Scenario
When you are adding any item to a SharePoint list, you will have the form given below.
![SharePoint]()
Sometimes, based on the requirement, we need to change the text of the button from "Save" to "Confirm" or "Insert" or any other text.
Thus, I am sharing one of the common approaches which you can use to change the text of the input button of the list, where the default is Add/Edit form.
Solution
- Step 1
Open Add/Edit form of SharePoint list.
- Step 2
Click Setting icon and select "Edit the page".
- Step 3
Insert Content Editor Web Part on the page and write the code given below into CEWP and save the page
- <script type="text/javascript">
- function UpdateButtonText() {
- var submitButtons = document.getElementsByTagName("input");
- for (i = 0; i < submitButtons.length; i++) {
- if (submitButtons[i].type == "button" && submitButtons[i].value == "Save")
- submitButtons[i].value = "Send Email";
- }
- }
- _spBodyOnLoadFunctionNames.push("UpdateButtonText");
- </script>
- Step 4
Once the page is saved, you will able to find the new updated text instead of default "Save".
![]()
Thus you are done. Similarly, you can change the text at Edit form also.