Email_client_open.hide() is not working

Sofia Belber
Tera Contributor

I'm trying to hide the email_client envelope button when the request is in certain states, so I created an onLoad Client Script using the email_client_open.hide() function but is not working. Browser console is saying '$ is not a function'. The  email_client attribute is enabled on my table and I saw that this particular one is called by $email_client_open.

SofiaBelber_0-1679582325803.png

SofiaBelber_1-1679582367102.png

 

 

 

function onLoad() {
	
    var state = g_form.getValue('state');
     if ((state == 3 || state == 17 || state == 20)) {
        try {
            if ($('email_client_open')) {
                ($('email_client_open').hide());
            }
        } catch (ex) {

            jslog('Policy tpc Request OnLoad Fail: ' + ex.toString());
        }
    }
}

 

 

 

I need help figuring out why its not working and/or find a new solution to hide it on particular cases. Please help!!!!!!

 

 

5 REPLIES 5

Hi Tera, isolate script its unchecked but its still not working, im not sure why