none
Modifying Site Content Type Document Form RRS feed

  • Question

  • Hello -

    Is there a way to modify the Site Content Type Document form Master Page when uploading documents on any document library on the portal?

    I know how to add new content types so when document libraries are created these content types are available upon upload.

    For example I need to add a classification content type for all document libraries that are created in sharepoint.

    However, depending on what is selected as the classification I need to hide/unhide certain fields.

    Is there a way to accomplish this?  Say for example modify the main Site Content Type Document form?  Can this be done?

    Also, is there a way to add custom workflows using SPD to the Site Content Types?

    Any guidance on this would be of great help.

    Thank you,

    v/r


    JES
    Tuesday, December 15, 2009 1:14 PM

Answers

All replies

  • JES:

    Lots of questions bundled into this one, and not all totally clear.  I'll try to take them one by one:

    Q: Is there a way to modify the Site Content Type Document form Master Page when uploading documents on any document library on the portal?
    You shouldn't try to change the Document Content Type, as it underlies too many things.  Create a new Content Type (I'll often create one called something like 'Client Document Base' or something) which inherits from Document.

    Q: I know how to add new content types so when document libraries are created these content types are available upon upload.  For example I need to add a classification content type for all document libraries that are created in sharepoint.
    Probably the easiest answer on this is the save a Document Library with the settings you want as a template and then create all of the other Document Libraries from that template.

    Q: However, depending on what is selected as the classification I need to hide/unhide certain fields.  Is there a way to accomplish this?  Say for example modify the main Site Content Type Document form?  Can this be done?
    Again, don't try to modify the Document Content Type.  To hide/show fields conditionally, you'll need to use script on the page.  (See my jQuery library below for some useful functions for this.) If you want to hide a column fully, you can set it to Hidden in the Content Type settings.

    Q: Also, is there a way to add custom workflows using SPD to the Site Content Types?
    Yes.  Workflows can apply to specific Content Types, or you can build the varying logic per Content Type into a workflow at the list level.

    M.

    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc - jQuery Library for SharePoint Web Services
    Tuesday, December 15, 2009 2:46 PM
  • sympmarc -

    Thank you for your reply.

    The only reason why I asked about the Site Content Types is because I need these options for all document libraries to be global.

    I don't know any other way this could be done. 

    Let me try to explain a little clearer.


    I was tasked to find out a way to prompt users to select a classification for all documents uploaded onto the portal.  Regardless if they are uploading to an existing document library or if they just created a new document library.

    So all document libraries regardless where they reside on the portal will prompt the user for a classification as a required field before they are able to upload any type of documents.

    I understand I can add a site column as a choice dropdown called "Classification" and make it a required field
    I then can then go to 'Site Content Type Gallery' -> 'Site Content Types' -> 'Document' -> 'Add from existing site column' and add the Classification column.

    This will allow for all new document libraries and existing document libraries to prompt the user for classification everytime the user uploads a new document.

    However,  how or where can I modify that upload template so if the user selects a specific classification it unhides certain fields?

    I followed your jquery example for hiding and unhiding fields a while back and it has been a savor for me, and i've been utilizing it for many things, thanks.  I just don't know how I can go about doing this globally without having users create new document libraries, or having have to select the custom document library every time they create a new one.

    Any suggestions?  I hope i'm a little more clearer here.

    So long story short.  I need to be able to prompt users for document classification for all documents uploaded onto the portal regardless where these document libraries reside.

    Thanks,

    v/r    


    JES
    Tuesday, December 15, 2009 3:18 PM
  • Well, I think I still come back to providing a template for the users to utilize in creating all Document Libraries.  If you are going to let them create Document Libraries themselves, then you'll need to come up with a way to prevent them from creating Document Libraries with any other template, too.

    M.
    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc - jQuery Library for SharePoint Web Services
    • Marked as answer by JEShidell Tuesday, December 15, 2009 3:43 PM
    Tuesday, December 15, 2009 3:21 PM
  • sympmarc -

    Thank you for the feedback.  I know this is no simple task.  I was just hoping that someone might have experienced with this or knew of an easier way.

    I guess I will have to just implement some business rules.  Create a template and have the users utilize it.


    Thanks again.


    v/r
    JES
    Tuesday, December 15, 2009 3:44 PM