Add customized item to calendar app
-
29-09-2020 - |
Question
if I want to add a new calendar entry I see this:
But I want to see only: Title Location Instead of start time and end time I want to put the "all day" check Recurrence
Is it possible? How?
Thanks in advance!
Solution
Definitely! You can accomplish this using SharePoint Designer or using JSLink. Inside SharePoint Designer (free application), you can create a new list form of type New. Then you can set it as default. Then inside the form, edit the form and comment out the that you see that contain the fields that you want to hide.
You can comment out each field like so: (Do this for each field you want to hide)
<!-- <tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Title</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Title" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Suggestion')}"/>
<SharePoint:FieldDescription runat="server" id="ff1description{$Pos}" FieldName="Suggestion" ControlMode="New"/>
</td>
</tr> -->
Also, you can change the textboxes through JQuery on the page. You need to add the tag to allow jQuery to be run inside the list form markup inside the "AdditionalPageHead" content tag.
<script language="javascript" type="text/javascript" src="../Style Library/jquery-1.11.0.min.js"></script>
Inside another tag, you can check the box recurrence and all day event using this:
<script type="text/javascript">
$("h3 :contains('Recurrence')").closest('tr').find('input').attr('checked', true);
$("h3 :contains('All Day Event')").closest('tr').find('input').attr('checked', true);
</script>