- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 11:33 AM
Hi Guys,
We are trying to hide the option to Remove All and the Pen icon in the MRVS. I have the onChange script below. It works perfectly in the Portal but not on the classic UI.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 11:47 AM
Hi Jocelyn,
Try this line to hide the Remove All button in the classic UI:
document.getElementById(mrvsid + 'removeAllRows').style.display = 'none';
Here's the lines I've used to hide the row delete and edit buttons:
var mrvs = g_form.getValue(mrvsname);
var obj = JSON.parse(mrvs);
for (var i = 0; i < obj.length; i++) {
//delete - check Name, may be 'cross' instead
document.getElementsByClassName('btn-sm multi-row-delete-row')[i].style.display = 'none';
//edit
document.getElementsByClassName('btn icon-edit btn-sm')[i].style.display = 'none';
}
Inspect the elements to make sure those names are still correct, and ensure the Isolate script box remains unchecked. Also, I typically run this onLoad with a setTimeout to allow the MRVS to load as/after the form loads before the hiding is attempted, but if it's already loaded and onChange of whatever works for you then that's one less thing to worry about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 01:27 PM
Finally, it is working!!!
I was able to put the code in the right spot!
Thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 06:33 AM
You are welcome!