Fields not in FieldControlCollection for SharePoint 2013
I have faced the problem with accessing form fields in SharePoint 2013. I created a content type test001 and 3 site columns, then added the 3 site columns to the content type, added the content type to a list, set the content type test001 as default content type. Idea is to prefill some field when the list newform.aspx opens. I tried to access the basefieldcontrols from SPContext.Current.FormContext.FieldControlCollection from newform.aspx.cs, butFieldControlCollection does not contain any of 3 site columns. There was no problem with accessing form fields in SharePoint 2010, but in SharePoint 2013 it seems that it is a bug. I hope that someone have already faced the same problem and will provide some solution or recommendations how to deal with this issue. |