Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

Hiding Custom List Items

Last post 11-16-2007, 2:38 PM by danholme. 0 replies.
Sort Posts: Previous Next
  •  11-16-2007, 2:38 PM 28880

    Hiding Custom List Items

    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)
View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. You’ve Deployed SharePoint…Now What?This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions Ease Your Scripting Pains with the Flexibility of PowerShell!Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer! Protecting Sharepoint with Double-Take for Windows 5.0Providing SharePoint recoverability is a two step process. Learn those steps now. Vendor protection solutions for SharePoint are incomplete at worst and unreliable at best. So what’s an Administrator to do? Read More… Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.