Question

I have a list on a SharePoint 2016 using 3 content types.

When an item is edited the end-user has the Content Type field to toggle between content types.

I am looking to see if there is a way to select the content type on the newform.aspx or a custom new form.

Each of the three content types displays different variations of the columns. I want the user to select the content type to the fill out the field for that content type.

Thank you,

Martin

Was it helpful?

Solution

This is not possible OOTB. You need to create a custom new form.

Usually new form URL for specific content type in is in below format:

http://siteUrl/Lists/CustomListName/NewForm.aspx?RootFolder=%2FLists%2FCustomListName&ContentTypeId=0x01001F4E17A590CC8E4998BE646AEA065BFE

Consider, where 0x01001F4E17A590CC8E4998BE646AEA065BFE is Content type ID and RootFolder is URL of your list.

Follow below steps:

  1. Create a drop-down in your custom form to select content type which will have display text as a content type name and value as a content type ID.
  2. On selection/change of Content type drop-down build the new form URL for that particular content type in above format.
  3. Redirect your Page to the newly build URL.
  4. Also, read content type from URL. If Content type Id is available then set your Content type drop-down value with content type from URL.

Additionally, OOTB you can always select the Content Type while creating new list item like below:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top