Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Fields not in FormContext.FieldControlCollection for Sharepoint 2013

$
0
0

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.




Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>