Hide The Submit Button on a Catalog Client Script

Snow Tomcal
Tera Expert

Hi All,

I want to hide the submit button on a specific catalog item based on a condition.

I tried using a UI policy but it's executed after the page has loaded. Because the page is heavy, it takes a second and the user can see the submit button before it disappears.  Is there any way to hide the button before the page loads? 

Thanks 🙂

16 REPLIES 16

SwarnadeepNandy
Mega Sage

Hello @Snow Tomcal,

 

You can try using with script like canWrite() in the UI Action or ACL.

What is the condition for showing the Catalog item but not able to submit?

 

Kind Regards,

Swarnadeep Nandy

Value of a field

Sandeep Rajput
Tera Patron
Tera Patron

Create an onLoad client script and put the following code.

   var submitButton = this.document.getElementsByClassName("btn btn-primary ng-binding ng-scope");
    submitButton[0].style.display = 'none';

 

It still takes a few seconds for the button to disappear.