Is it possible to change Related Items view "Add New Item" link text?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Please, put the following code into JS-editor of Forms Designer:
Replace 'New text' with your own text of the new item link.
Code: Select all
$('.ms-addnew a, .ms-list-addnew span:eq(1)').html('New text');
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
$('.ms-addnew a, .ms-list-addnew span:eq(1)').html('New text');
});
I figured it out. Needed to add .eq(number) to it
Code: Select all
$('.ms-addnew a, .ms-list-addnew span:eq(1)').eq(0).html('New text');
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
$('.ms-addnew a, .ms-list-addnew span:eq(1)').eq(0).html('New text');
});
Are you able to apply this to the default "Tthere are no items to show in this view...." would it be something like this? $('.ms-listviewtable table td.ms-vb:contains('There are no items'):eq(1)').eq(0).html('Replace'); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() { $('.ms-listviewtable table td.ms-vb:contains('There are no items'):eq(1)').eq(0).html('Replace'); }); This doesn't work but imagine it would be similar to the Add New Item Thanks Murray
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests