views:

568

answers:

2

I've got a custom list with a custom content type. I'm aware that when you create a new item you can see a drop down for the different content types on that list which I assume all have their own NewForm.aspx somewhere. I can specify in the content type definition which columns are shown on the New form and that I can replace the new form with a custom one of my own design.

What I'm trying to achieve is to have multiple New forms but for the same content type listed on the New drop down. I would like each new form to expose different fields of the content type. Additionally I'd like to make particular New forms only visable by users with particular permissions although this isn't critical.

Scenario: I've got a content type with all the fields I need for a risk assessment. When a new item is created it only exposes fields to enter contact details. Once this is created a workflow with infopath forms then drives the gathering of the rest of the risk assessment information through booking, the inspection itself and approval of the data. I want the ability to have a second option to easily enter all this information on a different new form for an inspection that's already been done and needs logging in the system.

A: 

Dan,

Per your scenario, I have done something similar by creating one content type per actor/stage. Consider using a simple SharePoint Designer workflow to change your content types onChanged (simply by setting the Content Type) column so that the perspective actors only see the columns you want them to see in the edit/newforms. As long as the proper content type is set, your users will only see the fields you want them to see. Furthermore, with creative use of views and audience targetting of pages you can somewhat prevent these users from seeing columns.

Also, you can prevent users from seeing the different content types (under the new button) in the advanced content type page.

UJ
Thanks for the suggestion but your solution would require me to rewrite everything I've done thus far which is something I can't do. I'll continue to look for another and hopefully cleaner way to what you suggest and will post here for the world if I find it.
Dan Revell
+1  A: 

You could customize the NewForm.aspx (e.g. via SharePoint Designer) for the initial submission case. Obviously, all of the required fields will need to be populated in some fashion.

The EditForm.aspx is the out-of-box page for updating existing list items. You may be able to customize this to meet your update an existing risk assessment case. From the post above it's not entirely clear to me whether this distinction between these pages is fully understood.

In both of these cases, you can add code-behind to the .aspx pages. However, it's usually best to start as simply as possible, keep it as simple as possible and only add complexity as necessary.

Hope this makes sense and helps. Good luck!

Jason Weber
I know all these pages can be customised in designer but I can't do that. I need this to be deployable as a wsp so if I want to replace NewForm.aspx I need to hand build it and include it with a feature. What I am after is something along the lines of multiple NewForm.aspx pages for the same content type and availabe on the new drop down of the list view toolbar.
Dan Revell