질문하기질문하기
 

답변됨Disable all day event in Calendar list

  • 2009년 6월 26일 금요일 오후 4:49pl7626 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi there,

    Is there anyway of disabling the All day Event field in a Calendar list. I don't have the option to hide it either.

답변

  • 2009년 7월 3일 금요일 오후 12:46SP RAJ 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Parvez, you can use Office Toolbox feature available on Codeplex, which allows site users to get greater control of your New/Edit/Display forms and their fields for show/hide and also field validations

    Hope this helps.

모든 응답

  • 2009년 6월 26일 금요일 오후 5:03Kyle Schaeffer 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    If you re-create the form in a new ASPX page using a data view web part, you should be able to edit the form XSL in order to remove the checkbox.

  • 2009년 6월 26일 금요일 오후 7:59KolbyH - MSFT 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Yes, I would agree with Kyle. You can re-create the New and Edit forms to remove the all day option - that way a user can't create an all day event. 
  • 2009년 6월 26일 금요일 오후 8:08David Lozzi 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    You could use javascript on the page, instead of breaking the page inheritance using SPD, to hide the row. Using SPD, throw this at the bottom, outside of the web part zone

    <script language="javascript">
    function HideField(title){
    for(var i = 0; i < document.all.length; i++)
    {
        var el = document.all[i];
        // find html element with specified title
       if(el.title == title)
        {
            var pars;
            pars = el;
            for(var j = 0; j < 10; j++)
            {
                //loop through parents and hide the parent row
               if(pars.className == "ms-formbody")
                    break; //should have the TD object now

                pars = pars.parentNode;
            }         
            pars = pars.parentNode; //get the TR object
            pars.style.display = "none"; //and hide the row
            break;        
        }
    }
    }
    {

    HideField("All Day Event");
    }</script>


    I've written a webpart that also handles this much easier, if you're interested let me know and I'll send it over. Hoping to get it to codeplex soon.
    HTH


    David Lozzi
    Delphi Technology Solutions
    Blog  |  LinkedIn | Twitter
  • 2009년 6월 30일 화요일 오후 5:05pl7626 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     코드 있음
    Hi David,

    When I tried the javascript, it didn't work on the Display form. I modified the script a little and now it works on all three forms (display, edit, new). Here's what I used:

    <script type="text/javascript">
    function HideField(title){
    var header_h3=document.getElementsByTagName("h3") ;
    
    for(var i = 0; i <header_h3.length; i++)
    {
        var el = header_h3[i];
        var foundField ;
       if(el.className=="ms-standardheader")
        {
            for(var j=0; j<el.childNodes.length; j++)
            { 
                if(el.childNodes[j].innerHTML == title || el.childNodes[j].nodeValue == title)
                { 
                    var elRow = el.parentNode.parentNode ;
                    elRow.style.display = "none"; //and hide the row
                    foundField = true ;
                    break;
                }
            }        
        }
        if(foundField)
            break ;
    }
    }
    
    HideField("All Day Event");
    HideField("Recurrence") ;
    HideField("Workspace") ;
    </script>
    
    Kyle,

    I'm also interested to know how to recreate the forms in Sharepoint Designer. I'm new to Sharepoint Designer. Do you know of a specific article on creating these forms with the same look and feel as other pages in the site.
  • 2009년 6월 30일 화요일 오후 5:08David Lozzi 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Interesting... this works for me on the display forms... Thanks for the update!


    David Lozzi
    Delphi Technology Solutions
    Blog  |  LinkedIn | Twitter
  • 2009년 6월 30일 화요일 오후 5:20pl7626 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I guess a more simpler solution would be to create a custom list with appropriate fields (start date, end date, etc.) and then creating a calendar view. But You don't get the option to connect it to Outlook 2007. And, when creating a custom list, creating calender view won't give the option for "All Event Event", "Workspace". It also won't have the "Recurrance" functionality.

    In my case, I don't need to (although I wanted to) connect it to Outlook 2007. I added some extra fields to the Calendar List, which doesn't appear in Outlook.
  • 2009년 7월 2일 목요일 오후 10:46sparkymark75 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    If it's a one-off administrative function, i.e the list is created and you simply want to hide the All Day Event field, you can download either SharePoint Manager (CodePlex) or WSS List Configurator (CodePlex) and use those to hide the field. You can even specify which forms to show it on or whether or not just to hide it full stop.
  • 2009년 7월 3일 금요일 오후 12:46SP RAJ 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Parvez, you can use Office Toolbox feature available on Codeplex, which allows site users to get greater control of your New/Edit/Display forms and their fields for show/hide and also field validations

    Hope this helps.