Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Renaming "Save" or "Cancel" Button Text on SharePoint List Forms
WhatsApp
Laxman Vyavahare
10y
56.7
k
0
0
25
Blog
Introduction
This article will explain how to rename default Button Text on SharePoint List Forms. Lets see how to change or rename "Save" button's text to something else which gives more meaningful name.
Before renaming button text like "Save":
1. Using jQuery to Rename "Save" button Text to Submit.
Place the below jQuery script in a text file, Upload it to a document library, add a Content editor webpartto the NewForm.aspx page, and specify the "Content Link" in Content Editor Web Part's Property Pane.
or
You can write this code on newform.aspx page directly.
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"
type=
"text/javascript"
></script>
<script>
$(document).ready(
function
()
{
$(
"input[value$='Save']"
).attr(
'value'
,
"Submit"
);
});
</script>
See result:
2. Using JavaScript to Rename "Save" button Text to Submit:
Open newform.aspx page in designer and write fallowing line of code below <script> tag.
<script type=
"text/javascript"
>
_spBodyOnLoadFunctionNames.push(
"changeSaveBtnTxt()"
);
function
changeSaveBtnTxt()
{
//Get all Input Elements on the page
var
inputs = document.getElementsByTagName(
"input"
);
//Get the "Save" button
for
(i = 0; i<inputs.length; i++)
{
if
(inputs[i].type ==
"button"
&& inputs[i].value ==
"Save"
)
{
//Change the "Save" button's Text to "Submit"
inputs[i].value =
"Submit"
;
}
}
}
</script>
Up Next
Create Custom Save and Redirect Button On A SharePoint Form
Ebook Download
View all
Getting Started with SharePoint Framework Development using TypeScript, PnP JS, and React JS
Read by 4.9k people
Download Now!
Learn
View all
Membership not found