TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Renaming "Save" or "Cancel" Button Text on SharePoint List Forms
Laxman Vyavahare
Nov 02, 2014
56.6
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This blog will explain how to rename default Button Text on SharePoint List Forms.
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>
Next Recommended Reading
Create Custom Save and Redirect Button On A SharePoint Form