0

I want to add a new section to the left panel of the form designer for a custom WFFM field I created, I tried the following code but it didn't work:

[VisualFieldType(typeof(EditField))]
[VisualProperty("Max file size limit (MB) :", 5)]
[VisualCategory("Upload")]
public string FileSizeLimit
{
    get
    {

    }
    set
    {

    }
}

Following how the custom field I created looks like:

public class MVCSecureFileUpload : Sitecore.Forms.Mvc.ViewModels.Fields.FileUploadField
{
    [LimitFileTypeAttribute]
    [LimitFileSizeAttribute]
    public override HttpPostedFileBase Value { get; set; }
}

I'm using Sitecore 8.2.

Any Ideas?

  • What exactly did not work? The property did not appear in the left side of the form designer or the validation is not working correctly? – jammykam Sep 28 '17 at 17:14
  • The validation is working fine, and I have two empty text boxes appears as properties in the form designer for that custom field ( but these two text boxes appear without labels) I believe they are related to the attributes [LimitFileTypeAttribute] [LimitFileSizeAttribute], now I am not sure how I can control these attributes? – Mohammed Syam Sep 29 '17 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.