Hide Columns in New Item Form in Sharepoint

HI Guys,
Lets Say you have Calendar list and Once you Create New Item for Calendar you have Columns like All Day Event,
Recurrence and Workspace and you want to hide them.
You can achieve this without even touching to New item form and Share point Designer.

So lets get going,goal is here to get rid of All Day Event,Workspace etc.

Assuming that you Know how to use Jquery in sharepoint.

Go to New Item Form,Click Site action menu and then Edit page but hold on Edit page options is not visible.
here is workaround for that in address bar of Browser at end of Url just add &ToolPaneView=2.

Once you Open page in edit mode add Content Editor Web part then go to Source Editor and Copy & paste Following Script and make change to path to add jquery api file

Here is Script to hide

<script type=”text/javascript” src=”Path to Jquery File”>
<script type=”text/javascript”>
 $(document).ready(function(){
        $(“span[title=’All Day Event’]”).parent().parent().parent().hide();
});

Now What about In Dispform.aspx  and editform.aspx pages will this same Script work in those pages?
Well this same script will work on Editform.aspx but for dispfrm.aspx use following script

<script type=”text/javascript” src=”Path to Jquery File”>
<script type=”text/javascript”>
 $(document).ready(function(){
        $(“td.ms-formlabel:contains(‘All Day Event’)”).parent().hide();
});

Before :

After :



























Thanks
Ronak







Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s