6

I am working on the Knowledge Database in SharePoint, so I have created several content types with lists. I want customers to be able to create a new article and get a different FORM based on the type of article they want to create.

The challenge I found is that when they click on "NEW ITEM" they get the default content type and are not allow to select which one they want. However, if they go to edit the item after creating it then they can change the content type from a drop down menu.

I was wondering if there is any way to activate the Content Type drop down as soon as they click "NEW ITEM".

3 Answers 3

3

The simplest and most common way to handle this would be to hide the Add New Item link altogether on the list view by setting the toolbar type to "None". This would force users to use the ribbon.

If you prefer to enable some sort of custom functionality on that link, that's possible but would require some pretty advanced javascript.

0

I had the same challenge and first I tried to solve it on Client side with SPServices and JQuery. This worked fine but I had some Problems with the User and Groups Field (Could not get the SPUserID... strange, because I could get in on my test-System but not on the live-System).

Then I thought about a much simpler solution with an Event Receiver. I created a DropDown Field for the Content Type and read the value in my Event Receiver. Based on that value I changed the Content Type Field in the AfterProperties. I also had to create a custom NewForm.aspx with all the fields of both Content types. Depending on the value of the drop down I hide/Show the fields I need with JQuery.

0

I've just followed the instructions in the below link and this does exactly what you want!

SharePoint: Force the New button to show Content Type choices

This article provides JavaScript code (written for SP 2007) to add to the page, that will make the New button behave as if the user clicked on the dropdown menu adjacent to the button. It may be possible to write similar code for later versions of SharePoint.

1
  • While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. [moderator]
    – SPDoctor
    Feb 19, 2013 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.