Question

I created a New Custom page in the list and set it as default, Before that, I enabled the Allow management of content types? checkbox and created a column by checking Add to all content types check box.

But it not showing in a custom page, It showing in Default newform.aspx. I don't understand why? Correct me If I am missing anything. Thanks in advance

Was it helpful?

Solution

The default list forms are using the ListFormWebPart class.

When you create a new list form, the new one is using the DataFormWebPart class, which means you have to manually specify which fields appear on the form by editing the form in SharePoint Designer.

You can check the differences yourself by editing the forms in Advanced Mode in SharePoint Designer and looking between the WebPartPages tags.

If you do not want to manually edit the fields on the new form, you can convert it to use the ListFormWebPart class. To do this follow the steps below:

  • Copy the WebPartPages tags and everything in-between them from the default NewForm and paste it over the WebPartPages tags in the new NewForm.
  • Open up a website that can generate a new GUID (e.g. https://www.guidgen.com)
  • Copy the new GUID and paste it in the following places on the new NewForm:
    • the value of the __WebPartId attribute of the WebPartPages tag
    • between the ID tags after the g_ bit. MAKE SURE to replace the hyphens of the GUID with underscores.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top