The jslog() global function can be used in any client-side script. The output of the jslog() method is in the JavaScript Log window and visible only to users with the admin role.
As shown in the following screenshot, open the Hide return date field on load client script we created earlier in this book in Studio:
Now replace the code in the Script field with the following code:
function onLoad() { //hide return date if return checkbox is not checked if ( ! g_form.getBooleanValue("u_is_return")) { jslog("Hiding return date field. Return checkbox is: " + g_form.getBooleanValue("u_is_return") ); g_form.setDisplay("u_return_date",false); ...