Is it possible to change Related Items view "Add New Item" link text?
Posted by eedoh - Feb 24 ’14 at 04:50
I'd like to change "Add new item" link text in Related Items view into something else, but can't find the way of doing that. Is it possible, and if yes, how can I do that??
Thanks
-
Dmitry KozlovAdminMember for: 9 years 4 months 17 days
Please, put the following code into JS-editor of Forms Designer:
$('.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'); });
Replace 'New text' with your own text of the new item link.
-
eedohMemberMember for: 9 years 5 days
This really does change the text, but it changes it in every one (4 of them) of the related items views, and I need it to be changed only on one of them. Any way of restricting this to only one view??
Thanks
-
eedohMemberMember for: 9 years 5 days
I figured it out. Needed to add .eq(number) to it
$('.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'); });
-
MurrayMemberMember for: 8 years 11 months 19 daysAre 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
Displaying 1 to 4 of 4 messages