How to hide, disable calendar list item fields in Sharepoint - sharepoint

I want to hide or make some fields read only on editform.aspx. I follwed the example on this page, but without deliting the "original" webpart list. I hide the original webpart and created a new custom list from the original list. Then i was able to apply xsl on the custom list to hide or to make the field "read only". Unfortunately the recurring events stopped working or where totaly messed up. Some times i've got error messages when I clicked on specific event in calendar view. The calendar list works fine and the fields are hidden or disabled in "Edit mode" when the event is not recurring. My question is. Is there any other way to hide or disable the items for specific security group or sharepoint group on calendar list?

If SharePoint Designer is an option, then this blog post from Laura Rogers shows how you can display SharePoint fields by permission level. It should work with a calendar list.
This will give you complete control over the solution without the need for a third-party product.

Two tools I've run across to do what you're looking for:
SPListDisplaySetting - "SharePoint feature (for WSS 3.0 and MOSS) providing advanced settings to customize list form rendering in new, display and edit mode."
You can specify that certain fields only show up on edit, new, or display pages and only for certain groups, or to hide them completely.
My only problem with this is that the installer doesn't quite work. However, a user has posted working instructions on the discussion board.
SharePoint Tool Basket - List Columns Manager - "This feature allows site collection administrators to view all the columns of a list including hidden/read-only ones and gives column details such as the internal name, Guid, Type.."

I found a pretty nice solution at Cleverworkarounds. The code is writen in javascript so the script does not actually remove the fields, which in my case is necessery, but it does hide the fields. Me, I need to stick to SharePoint List Form Extensions due to some sensitive data our customers have and want to be remove for some users. Laura Rogers solutions is good too, but with Cleverworkarounds you don't need to use Sharepoint Designer.

One option is to download the Sharepoint Manager from CodePlex. Install it on the server (it uses the object model) and you get simple access to a whole heap of stuff including, on a per-field-per-list basis, whether a specific column is hidden in it's entirety (even from the list settings), or hidden from the display form, the edit form or both. It's a matter of setting a true/false dropdown and clicking save. There is also the option for making columns readonly too.
It's all or nothing in terms of permissions though - whatever you choose applies to everyone who can access that area.

You can hide items in the calendar list using JQuery. Please follow the steps below:
- From the Calendar tab Customize List category select -> Form Web Parts -> Default New Form
- Select the Insert tab and from Web Parts category -> click Web Part.
- Choose Media and Content, then choose Content Editor and click Add.
- Place the Content Editor below your form and click inside the Content Editor
- Click on Format Text tab -> Markup category -> Click on HTML -> Edit HTML Source
Add the following code:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function() {
$("td.ms-dttimeinput").hide();
$("span[title='All Day Event'] > input").attr("checked","checked");
$("tr:has(span[title='Recurrence'])").not("tr:has(tr)").hide();
$("tr:has(span[title='All Day Event'])").not("tr:has(tr)").hide();
$("tr:has(span[title='Workspace'])").not("tr:has(tr)").hide();
});
</script>
The above code also puts the "All Day Event" to be checked true.
Hope this would be useful ..

I think it is little bit hard to do that. Otherwise there should be not so much such third party tools like SharePoint Column View Permission, Bamboo also has such tool.
Take a look at this if you want make it happen through code stackoverflow.com/questions/1058232. But I am not sure it works in calender.

Related

Quick Edit View Substitute in Modern?

I have been attempting to have a section on a Sharepoint main page where anyone with modify access to that document library can easily modify the document metadata. Specifically there is a Status column that directs which stage of a review process a document is in and where it is displayed on the site.
I'm trying to make this as painless as possible for the end users. Right now the proposed process is to click the Quick Edit button, modify the column via a dropdown, and then click Exit quick edit to save the changes. Ideally, this document library web part would have a view set up that allowed access to the dropdown without having to go into quick edit, but it appears that the modern view of Sharepoint Online does not allow for the datasheet view to work correctly when used within the web part.
Is there another option to make this editing simpler?
Thanks!

Sharepoint 2007 custom DispForm.aspx issue

I have a custom list tracking idea submissions (think virtual suggestion box) where I am attempting to customize the DispForm.aspx so that users will not see fields that are not directly relevant to viewing the submission.
I am making a copy of the original DispForm.aspx and renaming to i_DispForm_mod.aspx and then changing the settings of the list to use this as the display form.
Problem is, once I modify the display form settings, it takes over the whole ball of wax. I can no longer access EditForm.aspx. Clicking on "Edit" gets you the display form.
Creating the URL to the edit page manually takes you to the display page. Creating a new item works as normal.
For some reason, SP is deciding to redirect all requests for EditForm.aspx to the display form. Properties for the list supporting files are set to all the appropriate pages - but SP is ignoring that in favor of serving up the display form. WTF?
I have no idea how to fix this. This is my second go-round with this after abandoning the first list created when I first got this behaviour.
Oh and just to add additional fun, the behaviour persists after restoring to original DispForm.aspx and resetting list supporting file properties appropriately.
Absent solutions I may have to mark DispForm.aspx as radioactive, do not touch and abandon my design as unattainable.
I cannot find anything similar being documented anywhere on the web.

Suggestions for a custom web part in SharePoint 2010

I have a list created for the purpose of displaying news. So, the columns are: Title, Content and Created. For example, I'd like the list to let people know when there is a server outage planned.
What I want for the functionality of the web part is to display the title only and only the month/day the news item created in the list. I'd like a picture of a small arrow in the front of the items also (left side).
Example:
"
News Web Part
=> Server outage planned for this Saturday (06/23)
=> Server updates today (06/22)
"
I would like the user to be able to click on the titles of these items and it will go to a page that gives more information (Content column, rich text), instead of pop that AJAX window like what happens by default when you click on a list item.
Does this require Visual Studio? If not, is something like this possible?
Thank you!
I would recommend making a list to store the information that you want to provide to the end user via the SharePoint UI. Once you have your list create a view, Order it by most recently created and limit the number of items displayed to as many as you wish to display to the user.
Add a list web part(XSLTListViewWebPart) and point that at a view you have created.
This will give you something pretty basic visually.
You will then need to look in to XSLT to apply a style to that web part. There are loads of articles on google of how to do this.
You do not need to do this in visual studio, I sometimes just use notepad ++ for small things like this. The above should be enough for you to get started.
Cheers
Truez

Adding a WebPart to a SharePoint 2013 Master Page

Have looked on here plenty but this is the first time I've asked a question, so please bear with me.
Within my SharePoint site collection, I have a list of links to other systems within the business - this list is hidden to all users apart from Admins. There is a department column, indicating the department each link belongs to. There are two filter columns in this list - one is "active", the other is "show in System Links".
On each departmental page, there is a Content by Query Web Part (CQWP) showing the list, filtering to show:
- Specific departmental links
- Only where active
Separately to this, there is another CQWP on the homepage of the site collection showing all those links that have "show in System Links" ticked.
What this allows me to do is if for some reason a system is offline for maintenance, I can change the "active" value in the list and all links will vanish (preventing users going to the external system). It also allows me to add prominence to a link on the homepage if it's of particular focus that day / week / month (i.e. link to HR system to book leave if there's a leave deadline coming up).
What I want to do is move the homepage System Links CQWP to under the Quick Links on the left hand side, so they appear on every page. I did this with no problems in 2010, by literally dragging and dropping in the visual view for the master page, but seem to be struggling in 2013.
I've tried following the advice here:
http://ramisharepointblog.blogspot.co.uk/2013/01/how-to-add-custom-webpart-within.html
When I add these to the .html master file, I get an error message saying that I need to change the file extension of my HTML file to something else.
I get this message whether I copy and paste the code, or whether I use the button "insert web part". (Obviously doing this in SPD 2013)
When I do this, it seems to lose the reference to the .master file (or explode!)
As an alternative, I tried adding the code into the .master file, but of course I can't do this, as it won't let me move / edit / copy a .master file.
Any help in this would be MUCH appreciated, as I seem to be banging my head against a wall here.
On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010.
Please use the Design Manager -> Snippet Gallery.
In short:
You must wrap the Register tag with: <!--SPM: register tag -->
Like this:
<!--SPM:<%#Register Tagprefix="Publishing" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
You should wrap the opening tag of your Web Part with: <!--MS: tag -->
And the closing tag with: <!--ME: tag -->
The Web Part would look like this:
<!--MS:<asp:SiteMapDataSource ShowStartingNode="True" SiteMapProvider="SPNavigationProvider" ID="topSiteMap" runat="server" StartingNodeUrl="sid:1002">-->
…
<!--ME:</asp:SiteMapDataSource>-->
(Snippet Gallery will automatically create the tags in the right way and you can copy it to your master page.)
Possibly related to my question, have a look at the detailed answer given here: How to embed SharePoint 2013 webparts directly in aspx layout page as default webparts for that layout
I know this is an old question, but users get encouraged to search, and this is what came up, so I thought I'd help out fellow other users find an answer :P

How can I effectively group a whole bunch of Sharepoint lists?

I'm still learning Sharepoint and all of its various concepts, so apologies in advance for my ignorance. Here's what's going on - my company is moving a whole bunch of forms from another application into Sharepoint as InfoPath forms. Each InfoPath form is a Sharepoint list. So, we've got something like 300 different lists representing these forms.
My task is to put these lists on a page in some kind of reasonable format, meaning we need to present them in more reasonably-sized groups. Essentially, what I think I need is a list of lists. I've seen a few discussions here on this topic, all of which end with "Sharepoint doesn't provide a list of lists you need to do it yourself". I attempted to use a Content Query web part, but that only could get me the items inside each list, which in this case isn't what I want - I want the Sharepoint list itself.
From what I've read, it sounds like some custom code can build what I want. Is there any other way for me to group these lists?
Edit for more information: Part of the problem we have is that we aren't sure how to group the lists. I believe what Tom says below, that it's pretty easy to get a list of all the lists. But somehow, we still have a need to get the lists into the appropriate buckets.
For example, let's say there are 10 lists, and we want to group them by department. The first three belong to HR, lists 4-7 belong to IT, and lists 8-10 are Executives. Even with a custom code solution, we still need to make that connection, and I'm not sure how to do that (easily). If that's going to be a manual process anyway, it seems like a master list like #strongopinions suggests will be easier than a custom code solution?
I got this working using SharePoint Designer and a DataFormWebPart.
Steps:
Open the SharePoint site by clicking File -> Open Site and entering your site's URL (Ex: http://servername/sitecollection/subsite)
Open the page you will be adding the webpart to (Ex: default.aspx)
Click in one of your web part zones
Add the DataFormWebPart by clicking Insert -> SharePoint Controls -> DataView
In the Data Source Library pane on the right, under XML Web Services, click Connect to a Web Service.
Enter in a service description location to the Lists.asmx web service (Ex: http://servername/sitecollection/subsite/_vti_bin/Lists.asmx)
Click Connect
Choose GetListCollection for the operation
Click on your newly created Lists datasource and click Show Data from the dropdown
CTRL+Click to select DefaultViewURL and Title
Click Insert Selected Fields as.. -> Multiple Item View
Save your page and you're done!
P.S. You can also use something like this to generate a nice link:
<a>
<xsl:attribute name="href">
<xsl:value-of select="#DefaultViewUrl"/>
</xsl:attribute>
<xsl:value-of select="#Title"/>
</a>
Edit
Shoot. Didn't see the SharePoint2010 tag... these are instructions for SharePoint 2007. I'll leave this answer up here in case it is helpful.
I think the most flexible solution would be to create a custom webpart. With Visual Studio 2010, creating and deploying webparts is easier than ever before and the code to list all lists isn't very difficult either.
Not that I don't like SharePoint Designer, but I don't like to call the SharePoint webservices from inside SharePoint. It doesn't sound really performant.
Let me know if you need some help with the code.
You could create a list of links in SharePoint to act as a "master list." This list would contain URLs to each of the other lists. Then display your "master list." This would have to be created by hand though. Other than that you would probably have to use custom code to generate the list.

Resources