Comment to 'Developer Question: Visibility'
  • I have some forms on my site that I hide categories in this way. I use the following Javascript to hide specific options, including the "friends," "me only," etc.

      <script language="javascript">
    
    
    const aVars = ['GROUPS'];
    aVars.forEach(reduce_vars);
    function reduce_vars (sItem)
    {
    $(".sys-privacy-group").children().remove('optgroup[label=' + sItem + ']');
    }  
        
        
      $(".sys-privacy-group option[value=2]").remove();
      
      $(".sys-privacy-group option[value=3]").remove();
        
      $(".sys-privacy-group option[value=5]").remove();
        
      $(".sys-privacy-group option[value=6]").remove();
        
      $(".sys-privacy-group option[value=7]").remove();
        
      $(".sys-privacy-group option[value=8]").remove();
      
      $(".sys-privacy-group option[value=9]").remove();
      
      $(".sys-privacy-group option[value=c]").remove();
      
      $(".sys-privacy-group option[value=s]").remove();
    
    
    </script>
    

    That kind of what you are looking for?