umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
30 stars 0 forks source link

Umbraco Forms 14 missing MediaPicker field in custom field setting. #1305

Closed thf-09 closed 1 month ago

thf-09 commented 1 month ago

Ever since updating to Umbraco 14, any MediaPicker fields in my custom field settings don't show up anymore. The views I've tried are Umb.PropertyEditorUi.MediaPicker and Umbraco.MediaPicker3.

Reproduction

To reproduce, create a custom field or workflow in Umbraco Forms with a MediaPicker setting. For example this:

    [Setting("Image", View = "Umb.PropertyEditorUi.MediaPicker")]
    public string Image { get; set; }

    public CustomField()
    {
        this.Id = new Guid("0b52c034-e73c-4fbb-9ad7-c2716200d79b");
        this.Name = "Content Field";
        this.Icon = "icon-umb-content";
        this.DataType = FieldDataType.String;
        this.SortOrder = 190;
        this.SupportsRegex = true;
        this.FieldTypeViewName = "FieldType.CustomField.cshtml";
        this.Alias = "CustomField";
    }
AndyButland commented 1 month ago

Try Umb.PropertyEditorUi.MediaEntityPicker - that's the one we use internally for selecting the XSLT file from the media library for the email workflow that supports an XSLT file for transformation.

thf-09 commented 1 month ago

@AndyButland Ah, great, that works. It might be a good idea to update the documentation with that.

AndyButland commented 1 month ago

Good to hear, PR for docs is here: https://github.com/umbraco/UmbracoDocs/pull/6557