SharePoint Custom Form Issue

A few days ago my boss and I were on a 4.5 hour call trying to fix a SharePoint custom list that had started behaving strange after a migration from MOSS to WSS.  The creator of the list customized the “NewForm.aspx” and named it “NewForm_2.aspx”.  The issue was a single column that was not saving when a new item was created, but could be edited and it would save fine.   It was a lookup column to a list on the same site that had about 25 items.

First, we recreated the column with a new name & copied the data over then deleted the old column.  I refreshed and reordered the SharePoint custom data list on “NewForm_2.aspx”.  Still not saving…

Second, we recreated the lookup list.  Still not saving…

Third, we changed the column to a standard choice control and hard-coded the values from the lookup list into the choice field.  Still no luck…

I would go into all that we did, but it might take a few hours to list… so after “NewForm_7.aspx” was created (2,3,4,5,6 failed) I decided to not rearrange the fields on the form, leave them as they were default.  It worked!  So I reordered the columns in the list settings and created “NewForm_8.aspx”.  All is good now.

Lesson of this story: When creating custom forms in SharePoint.  #1 do not delete the placeholder where the data control is.  #2 Do not move fields on the form.  Removing fields is OK, but once they are moved you get unpredictable results.  Use the list settings to reorder the columns how you want THEN create the form.

0 comments:

Post a Comment