Stump the Panel » Site Managers and Site Collection Managers

Is it possible to remove default Event columns?

(2 posts)
  • Started 4 months ago by NancyCentury
  • Latest reply from AutoSponge
  1. NancyCentury
    Member

    I have unhidden the default "event" content type and have created a new event-based type because I am using a Calendar list as a project list (this is due to the "create workspace" cabability that the Calendar list has). It makes a great project tracking list and I have added all the columns I need to build workflows and manage my projects. I use the decision workspace, which gives me document library and other list capability. I can then use CQWPs to expose documents and lists from all the workspaces.

    One function I need is to allow users to submit a work request, which I would use to evaluate the idea to see if a full-fledged project is warranted. If so, I then flesh out the initial request with the rest of the related information needed to create a complete project.

    However, I do not want the Calendar columns "recurrence," "all-day event," "location" etc. to be part of my "request" content type or to appear on the "new" form. How can I remove/hide these without complicated code? Is this possible? I don't want to have to have 2 separate lists. I want to keep all my data in one place from user request forward.

    If not, is there any other way to enable that oh-so-convienient "create workspace" function that ties into my original list item?

    Posted 4 months ago #
  2. Because of the "custom code" working behind recurrence and all-day event, I typically use JavaScript to hide these fields on the new/edit/disp pages. I don't think hiding them is an OOB option (have to check again to make sure) and removing them is dangerous.

    I recall a script I wrote that did something like this:
    http://www.endusersharepoint.com/STP/topic.php?id=345&page=2

    <script type="text/javascript">
    
    _spBodyOnLoadFunctionNames.push("hideFields");
    
    function hideFields() {
      //add field name(s) to be hidden
      var a = ['Priority','Status','Start Date'];
      var tags = document.getElementsByTagName("NOBR");
      for (var i=0; i < tags.length; i++) {
        var trtag = tags[i].parentNode.parentNode.parentNode;
        var name = tags[i].innerHTML;
        if ((trtag.tagName == "TR")&&(name in oc(a))){
          trtag.style.display = 'none';
        }
      }
    }
    
    function oc(a){
      var o = {};
      for(var i=0;i<a.length;i++)  {
        o[a[i]]='';
      }
      return o;
    }
    </script>
    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.