- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 08:58 AM
Hi all,
I had created a catalog item variable called Album(check box). Need to highlight it in bold and any color using client script. Plz help me to solve it. Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 11:51 AM
I have tried in my PDI, please write a onLoad client script and mention below script there:
setTimeout is added just to load the form completely
function onLoad() {
setTimeout(function() {
if (window != null) {
// native
g_form.getControl('PLEASE_PROVIDE_LABEL_OF_YOUR_FIELD').setAttribute('style', 'font-weight: bold;color:blue');
} else {
// portal
var aTags = this.document.getElementsByClassName("ng-binding");
var searchText = "PLEASE_PROVIDE_LABEL_OF_YOUR_FIELD";
for (var i = 0; i < aTags.length; i++) {
if (aTags[i].textContent.toString() == searchText) {
aTags[i].style.fontWeight = 'bold';
aTags[i].style.fontSize = 'x-large';
//alert(aTags[i].style.width);
break;
}
}
}
}, 3000);
}
Please Accept the answer or mark it helpful if it works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 11:51 AM
I have tried in my PDI, please write a onLoad client script and mention below script there:
setTimeout is added just to load the form completely
function onLoad() {
setTimeout(function() {
if (window != null) {
// native
g_form.getControl('PLEASE_PROVIDE_LABEL_OF_YOUR_FIELD').setAttribute('style', 'font-weight: bold;color:blue');
} else {
// portal
var aTags = this.document.getElementsByClassName("ng-binding");
var searchText = "PLEASE_PROVIDE_LABEL_OF_YOUR_FIELD";
for (var i = 0; i < aTags.length; i++) {
if (aTags[i].textContent.toString() == searchText) {
aTags[i].style.fontWeight = 'bold';
aTags[i].style.fontSize = 'x-large';
//alert(aTags[i].style.width);
break;
}
}
}
}, 3000);
}
Please Accept the answer or mark it helpful if it works!