Difference between Field Default Values and Field Defaults?

Created on 18 April 2025, 10 days ago

Problem/Motivation

Thanks for creating a module!

I read the project page, and wonder what the difference is between Field Default Values (set_field_defaults) and the existing https://www.drupal.org/project/field_defaults/ (field_defaults)?

Because they look fairly similar ... If there is a big overlap, perhaps it's better to join forces?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Miscellaneous

Created by

🇩🇰Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ressa
  • 🇮🇳India keshav patel

    Hello @ressa ,

    The module Field Defaults can be used when:
    > When creating a new field or updating an existing field.
    > What it does is, when we add / update any fields configuration [for that particular entity type bundle, eg: Article]. It allows us to update or preserve all the existing content for that field for that particular bundle.
    > We can consider this module as an assistant to Bulk Operations on field values per bundle.

    What the Field Default Values module provides is:
    > It gives us the configuration form (/admin/config/field-defaults), which allows us to set the default values for some majorly used field types. such as Text fields, Number fields, Email etc.
    > Whenever we create a new field on any entity type, on any entity bundle.. It automatically checks the "Set default value" checkbox and pulls the default value from our saved configs for that field type.
    > Means, just the one time process saves our time to fill default values.., whenever we plan to create the field of particular field type at any place over the entire site.
    > Note: It works only when we create a new field.

  • 🇩🇰Denmark ressa Copenhagen

    Thanks, I get it now -- also after re-reading the project page a bit more attentively :)

    Maybe you could consider showing two images of how it works, of setting the defining the default value for a field, and then showing the result, when you are creating a field of that type? I think then I would have understood it faster how it works.

    Maybe include something like this on the project page?

    Set default value for "Text (plain)" field types

    Default value already set, when creating a new field of type "Text (plain)"

  • 🇩🇰Denmark ressa Copenhagen

    PS. Maybe add Drupal 11 support in *.info.yml? It seems to work fine ...

  • 🇮🇳India keshav patel

    Thanks for the suggestions.

    I've added the illustrative screenshots and added a new release with Drupal-11 support.

    Check here: https://www.drupal.org/project/set_field_defaults

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @keshav patel, it's very clear now, how the module works. And great that there's also Drupal 11 support.

    Perhaps, as a final touch, you could consider setting 1.0.x as the default branch in the GitLab repo, since that's where development takes place?

  • 🇮🇳India keshav patel

    Done, thanks!
    Closing this issue.

  • 🇩🇰Denmark ressa Copenhagen

    Beautiful, thanks!

Production build 0.71.5 2024