Question : Setting the "All Day Event" checkbox default to checked

I would like to edit the "NewForm" on a calendar so that the "All day Event?" checkbox is always checked.  I opened it through SharePoint designer, but couldn't find a way to change the default.

Thanks,

Jennifer

Answer : Setting the "All Day Event" checkbox default to checked

OK, here's what you have to do:

  1. Navigate to the list in SPD where you see newform.aspx, dispform.aspx, etc 
  2. Create a new .aspx page in SPD 
  3. Once the new page is open go Insert->SharePoint Controls->Custom list form 
  4. Select your calendar list from the drop-down (you should only have the content type "event" available) and select the 'New item form" radio button, click OK 
  5. Once the new information populates,
    Select the FormField for “All Day Event” (look at the attached image) 
  6. Click on the arrow to the upper right hand corner of the selection  
  7. Change the “Format As” field from “List Form Field” to “Check Box”  
  8. Find this code : 

<asp:CheckBox runat="server" id="ff6{$Pos}" text=" " checked="{$ff6Checked}" __designer:bind=" ...

and change it to [checked="true"]

  1. Save the page with whatever name you want
     
  2. In the folder list right-click your calendar list and select properties
     
  3. Go to the supporting files tab and click browse where it says new item form
     
  4. Browse to your newly created file, select it, click OK twice, and you're done.
     

The only problem with this solution is that it gives you a really ugly, plain webpage for your new form.

Hope this helps!

Random Solutions  
 
programming4us programming4us