Hide Submit from catalog item on Portal

DEV976
Tera Expert

Hi Community, Good Day!!!
there is a catalog item. I just want to hide the 'submit' button on the portal view.
I am using the below code :

function onLoad() {
//Type appropriate comment here, and begin script below
 
if(window == null){
// for portal
var z = this.document.getElementsByClassName("btn btn-primary btn-block ng-binding ng-scope");
z[0].style.display = 'none';
}else{
// for native
document.getElementById("submit_button").style.display  = 'none';
}
}
1 ACCEPTED SOLUTION

Balbir_Singh
Tera Expert

Hi @DEV976,
along with this code, You need to set isolate script set as 'false'

Balbir_Singh_0-1689864447813.png

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


View solution in original post

1 REPLY 1

Balbir_Singh
Tera Expert

Hi @DEV976,
along with this code, You need to set isolate script set as 'false'

Balbir_Singh_0-1689864447813.png

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.