Problem/Motivation

If you select only certain styles in the form widget option, and another style outwith those is selected as default, then that appears too in the entity edit form.

Steps to reproduce

1. Add a file field to a node
2. Configure the form widget: select only 'Original image' as the only available style. Leave the other options (AUTOMATIC is set as the default value for 'Default Style'
3. Create a node and upload an image
4. The AUTOMATIC style is shown even though it wasn't selected

Proposed resolution

Ideally, change the widget so you can't select a combination that doesn't make sense.

Various ways to do this:

- Adding a radio in the list of styles for the default one
- use AJAX to limit the options in 'Default Style' to the enabled styles
- add validation so you can't select a bad combination

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork insert-3622303

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review