/// <summary> /// Fill field types list. Form control types will be restricted to actual selection in Form control types drop-down list. /// </summary> /// <param name="isPrimary">Determines whether the attribute is primary key</param> /// <param name="clearValue">Determines if selector should clear selected value</param> public void LoadFieldTypes(bool isPrimary) { FieldEditorControlsEnum controls = GetControls(DisplayedControls, mMode, DevelopmentMode); string filteredControlsWhere = FormHelper.GetWhereConditionForDataType(AttributeType, controls, isPrimary, FormUserControlTypeEnum.Unspecified); drpControl.WhereCondition = filteredControlsWhere; // Exception for blogposts in document types if ((controls != FieldEditorControlsEnum.DocumentTypes) || (ClassName.ToLowerCSafe() != "cms.blogpost")) { // Show trackbackpingedurls only when editing blogposts drpControl.WhereCondition = SqlHelperClass.AddWhereCondition(drpControl.WhereCondition, FormUserControlInfo.TYPEINFO.CodeNameColumn + " <> 'trackbackspingedurls'"); drpControl.WhereCondition = SqlHelperClass.AddWhereCondition(drpControl.WhereCondition, FormUserControlInfo.TYPEINFO.CodeNameColumn + " <> 'trackbacksnotpingedurls'"); } drpControl.Reload(true); }