Skip to content

"Save and next" / "Save and prev" takes over UploadField-Content #27

@MLindenhofer

Description

@MLindenhofer

Hi,

I'm using CMS 4.11 and 1.3.8 of this module. I've problems with my UploadField in my DataObject-class here:

private static $has_one = [
    'Icon' => File::class
];

private static $owns = [
    'Icon'
];


public function getCMSFields()
{
    $fields = parent::getCMSFields();

    $fields->addFieldsToTab('Root.Main', [
        UploadField::create('Icon', 'Icon or Image')->setAllowedExtensions(['svg', 'png', 'jpg', 'jpeg'])
    ]);

The upload itself works but, if I hit "Save and next" / "Save and prev" or hit the arrows to navigate to the next DataObject of the class, the Icon is taken over as well. Seems to be a bug in my opinion.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions