From the MSD2D archives
Mauro Cardarelli
7/5/2004
ed: This tip provides a great, no-code way to hide items in custom lists in WSSv2 / SPS 2003. Of course, now WSS v3 and MOSS 2007 offer item-level security, which should be used to achieve this result.
I recently had a client pose an interesting Windows SharePoint Services question that required quick action and no custom coding. This is my (what I believe to be) clever solution.
We're using WSS as an extranet. Some users will be accessing a specific site and will have visibility into a custom list of open issues. We want the users to see all the list items but only have update privileges on a subset. This is what we did:
(1) Start with a SharePoint Custom List with a collection of items
(2) After entering a new item, click on the Edit icon for that row. This should bring up the EditForm.aspx page.
(3) Open that page in Microsoft FrontPage 2003 and save a copy, using File-Save As, under a different name (i.e. EditAdminForm.aspx). This version allows full access to list items.
(4) Return to EditForm.aspx and open it again in FrontPage.
(5) Click on you custom list and right click; select ‘Customize SharePoint List Form'.
(6) For each item that you wish to hide, click on the label cell for the appropriate row. On the FrontPage nav bar, you should see a selected HTML tag (it is on the far right). Click on the closest to it. The entire row should be selected.
(7) Click the dropdown and select ‘Edit Tag...'
(8) In the pop-up, alter the tag to read and save. This makes that row invisible.
(9) Repeat for each row you wish to hide.
(10) Somewhere on the EditForm.aspx page, place a hidden object. I used a borderless, transparent textbox on the lower left. Give it the following URL: ""BLOCKED SCRIPTlocation.href='EditAdminForm.aspx'%20+%20location.search""
The JavaScript will pass along the proper row ID. Admins will be trained to know where to look for the hidden URL and will have access to a full collection of list items. Unaware users will only see the visible list items. The SharePoint Save link works without alteration.
Dan Holme
Office & SharePoint Pro Community Leader
MVP (Windows Server - Directory Services)