/// <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>
    public void LoadFieldTypes(bool isPrimary)
    {
        var controls = GetControls(DisplayedControls, Mode, DevelopmentMode);

        string filteredControlsWhere = FormHelper.GetWhereConditionForDataType(AttributeType, controls, isPrimary, FormUserControlTypeEnum.Unspecified);

        drpControl.WhereCondition = filteredControlsWhere;

        // Exception for blogposts in document types
        if ((controls != FieldEditorControlsEnum.DocumentTypes) || !ClassName.EqualsCSafe("cms.blogpost", true))
        {
            // Show trackbackpingedurls only when editing blogposts
            drpControl.WhereCondition = SqlHelper.AddWhereCondition(drpControl.WhereCondition, FormUserControlInfo.TYPEINFO.CodeNameColumn + " <> 'trackbackspingedurls'");
            drpControl.WhereCondition = SqlHelper.AddWhereCondition(drpControl.WhereCondition, FormUserControlInfo.TYPEINFO.CodeNameColumn + " <> 'trackbacksnotpingedurls'");
        }

        var originalValue = FieldType;

        drpControl.Reload(true);

        var newValue = FieldType;

        // If previously selected control is not available, load default control
        if (!originalValue.EqualsCSafe(newValue, true))
        {
            FieldType = FormHelper.GetFormFieldDefaultControlType(AttributeType);
        }
    }