Override inherited property attributes - Form Elements

Jay
Jay
Vote:
 

I'm having a problem with the attributes I've set for an overidden property are being ignored and haven't found a way around it yet so looking for some help please.

Inherited from HiddenElementBlockBase, overrode PredefinedValue but the Display(Name: , Description:) is being ignored.

namespace AlloyTraining.Business.Forms.HiddenSourceCodeElementBlock.Block
{

[ContentType(DisplayName = "Hidden Source Code",
GUID = "d0841ef5-a0fa-4d21-a883-c9cd5070a71c",
GroupName = ConstantsFormsUI.FormElementGroup,
Description =
"Hidden field that picks up the source code from the current page or uses a default source code ")]
public class HiddenSourceCodeElementBlock : HiddenElementBlockBase
{

[CultureSpecific]
[Display(Name = "Source code",
Description =
"Set a default source code for the field, this can be overridden by a source set on the containing page or source code in URL.",
GroupName=SystemTabNames.Content,
Order = 10)]
public override string PredefinedValue
{

get
{

var str1 = this.GetPropertyValue(content => content.AlwaysUseDefault)
? string.Empty
: HttpContext.Current.Request.QueryString["sourcecode"];
return str1.IsNullOrEmpty() ? this.GetPropertyValue(content => content.PredefinedValue) : str1;

}

}

[Display(Name = "Always use default",
Description =
"Always use the default value that has been set and ignore any source code that is on the page or URL.",
GroupName=SystemTabNames.Content,
Order = 20)]
public virtual bool AlwaysUseDefault { get; set; }

}

}

#218569
Mar 16, 2020 15:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.