'Filled with a value' form state is broken

Created on 1 May 2023, over 1 year ago
Updated 1 July 2024, 5 months ago

Problem/Motivation

Note: The original description (below) used a different combination of field types but a simple Select field and Text field illustrate the problem nicely.

Steps to Reproduce

  1. Start with clean install of Drupal 10
  2. Add an integer list field (Select Field) to the Article content type with options: 1, 2, 3
  3. Add an integer text field (Text Field) to the Article content type
  4. Add a dependency: Text Field is filled with a value when Select Field has value "1"
  • Enter "1" for "Fill field with a value effect option: value"
  • Check "Restore previous value when untriggered"
  • Create a new Article
  • Enter "4" into Text Field
  • Select "1" for the Select Field
  • Select "2" for the Select Field
  • Expected result

    • Text Field value is set to 1 when Select Field is "1"
    • Text Field value is set back to "4" when Select Field is "2"

    Actual result

    • Text Field value is unchanged when Select Field is "1"

    Original report by StG

    🐛 Bug report
    Status

    Needs review

    Version

    4.0

    Component

    Javascript

    Created by

    🇨🇦Canada jmoreira

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

    Comments & Activities

    Production build 0.71.5 2024