Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Dropdown fields default value within Matrix not setting the default value #13538

Closed
DynamiteGoesBoom opened this issue Aug 9, 2023 · 2 comments

Comments

@DynamiteGoesBoom
Copy link

What happened?

Description

it appears that dropdown fields with a default value checked in the field settings do not populate the field with the default value.

Steps to reproduce

  1. Create a new matrix field with any assortment of data
  2. Add a dropdown with several options, check the default value you'd like to automatically get populated within the field

Expected behavior

Whatever is default should display the option and not be blank. In this example we set imageFilter to normal as the default value, but upon deployment the field is empty which causes an error until you update the field inside of the entry.

Actual behavior

Screenshot 2023-08-09 at 12 59 04 PM
Screenshot 2023-08-09 at 12 49 49 PM

The field is nested inside of a SuperTable field, so I'm not sure if this is an issue with Craft or Super Table

Thanks y'all 🎉

Craft CMS version

4.4.17

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@DynamiteGoesBoom DynamiteGoesBoom changed the title [4.x]: Dropdown fields default value within Matrix not setting the default value within SuperTable [4.x]: Dropdown fields default value within Matrix not setting the default value Aug 9, 2023
@brandonkelly
Copy link
Member

The default option is only supposed to be applied for new elements. Is it working as expected when you create new Super Table rows?

(That said, this is changing in Craft 4.5 – see #13540.)

@DynamiteGoesBoom
Copy link
Author

DynamiteGoesBoom commented Aug 10, 2023

@brandonkelly thanks and #13540 would certainly help. We add new fields all the time to Fido so anything that could help alleviate some of those issues would be great 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants