How to Hide or Disabled Custom Action Button in Opportunity Module

I was able to figure it out, I just added this code below in detailviewdefs.

{if $fields.connectivity.value != "NO"} <input type=button onclick="window.open(\'index.php?module=Opportunities&action=openPrintout&record={$bean->id}\', \'_blank\');" value="SAF Printout">{/if}