2012-10-20

SharePoint 2013 App List Edit Form Field Ordering

So I am getting in to SharePoint 2013 development, exciting stuff. Looking at apps first, they seem like something that will take off in a big way, better learn about them.

First port of call is a SharePoint 2013 App of the SharePoint hosted variety. All is well and good, creating a list, a few buttons a bit of functionality. I have decided to go down the path of building the list using site columns only, without a content type. Visual Studio 2012 creates what looks to be a special content type, called ListFieldsContentType, where it adds the fields you assign to the list. I did this because the content type way of doing things does not seem to replicate changes from the content type to the list. Maybe I have not found the menu action yet.

Anyway, with the ListFieldsContentType, I ran into a snag with field ordering. While the views would order correctly, no matter what I did, I could not get the edit form or display form to edit in the right order.

With a trial and error process, I managed to find a sort of solution. If I order the field GUIDs, then that seems to propagate into the display and edit forms. The Title field is always first.

Title - {b94ebbc8-e976-4433-86f3-da4d5026a657}
Field 1 - {19752e82-d2a1-43ec-998c-8c839201e85e}
Field 2 - {2c781178-3dce-41b7-80d7-4013b7cfa91e}
Field 3 - {3ce16d7b-59ab-4934-8f35-11420b47ce94}