Edit SharePoint Field properties, including lookup column list association, with client side code only


20.10.2010 Updated code to add some more features: Edit list properties: “Hidden”, “ShowUser”, “Ordered”, “Direction”. Field properties: ShowInDIP (document information panel) and cross site lookup functionality for a standard SharePoint lookup column. The article is updated and describes the changes.


This code enables you to edit the following using javascript/jQuery only

List properties:

  • Hidden: Hide the list so that it does not appear on the Documents and Lists page, Quick Launch bar, Modify Site Content page, or Add Column page as an option for lookup fields.
  • ShowUser: Specify that names of users are shown in “Created by” and “Modified by” fields.
  • Ordered: Specify that the option to allow users to reorder items in the list is available on the Edit View page for the list.
  • Direction: LTR if the reading order is left-to-right, RTL if it is right-to-left.

Field properties:

  • Hidden: Specifies whether the field is displayed in the list.
  • ReadOnly: Specifies whether values in the field can be modified.
  • Required: Determines whether the field requires values.
  • Show In NewForm: Specifies whether the field is displayed in the form that is used to create list items.
  • Show In DispForm: Specifies whether the field is displayed in the form for displaying list items.
  • Show In EditForm: Specifies whether the field is displayed in the form that is used to edit list items.
  • Show In DIP: Specifies whether the field is displayed in the “Document Information Panel” in compatible Microsoft Office applications. Only available for document libraries.
  • Show In List Settings: Specifies whether the field is displayed in the page for customizing list settings.
  • Show In Version History: Specifies whether the field is displayed in the page for viewing list item versions.
  • Show In View Forms: Specifies whether the field is displayed in pages that are used to view list data.
  • Lookup column web and list association (cross site lookup): Change the web and list association for a lookup column – Note: If you do this, all existing elements in this column will be lost. The cross site option is only available for site collection administrators!

Images:

IMG


IMG


IMG


Disclaimer:
I have removed some list types and some column types, but be careful using this tool. Test this in a “test list” before you use it in your “production environment”. If you edit the wrong field, you could break the list. Use this tool at your own risk!

Create a WebPartPage, insert a CEWP, and paste the code.
You find the code here

Regards
Alexander

51 Responses to “Edit SharePoint Field properties, including lookup column list association, with client side code only”

  1. L01$Lan3 Says:

    I created a test list.

    It looks like it will let me pick a subsite.

    But nothing has changed on my test list. Is there some other step I’m missing?

  2. Thomas Quillin Says:

    It’s a brilliant bit of code. Unfortunately in SP 2010, you set a field to read only and display in editform, and it no longer appears in editform. Seems like an SP bug to me.

    So all I could do was make a new edit form (which is detached sadly – won’t reflect future column changes) then edit the field settings in SharePoint Designer.

  3. Sanya Says:

    I’m not sure that this resolves the problem, sometimes we need to see some fields in edit form, sometimes this is part of requirements

  4. Edit SharePoint Field properties, including lookup column list association, with client side code only | Sharepoint Sriram Says:

    [...] SharePoint Field properties, including lookup column list association, with client side code only http://sharepointjavascript.wordpress.com/2010/03/30/edit-sharepoint-field-properties-including-look… Share this:TwitterFacebookLike this:LikeBe the first to like this [...]

  5. nagorsky Says:

    Hi!

    Thanks for script. But i can download it from https://bautz.homeserver.com/SharePointJavascript/Scripts/ChangeListAndFieldProperties/

    It says timeout error for any browser.
    How i can grab your code?

    Thanks.

  6. shruti Says:

    Hi

    i want to hide some columns in edit view.

    Thanks
    Shruti

  7. Josh Lee Says:

    This is freaking cool. Thanks for posting.

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 )

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


Follow

Get every new post delivered to your Inbox.

Join 435 other followers