I've implemented my ListFieldIterator to change the way field controls rendered.
I'd like to change the behaviour of form depending on the item content type,
but any attempts to determine ContentTypeId from the code returns wrong result.

2 Answers
2

In addition to the method with determining ContentType in custom ListFieldIterator from query string, ItemContext contains property ContentType. But this property is internal and therefore could not be used directly in custom ListFieldIterator implementation.

Below is presented wrapper for retriving ContentType based on corresponding property for SPContext (Reflection is used here)