Refactor suppression of extra input row

Created on 4 June 2024, 7 months ago
Updated 17 August 2024, 4 months ago

Problem/Motivation

Similar functionality was recently added to the Color Field module in Suppress extra value on edit when using HTML5 widget Fixed . The approach taken there is simpler, and notably allows for a site to take advantage of recent improvements in core, particularly a feature added in 10.2 to provide remove links.

Proposed resolution

Adopt the approach take in the Color Field module, which means less code.

📌 Task
Status

Needs work

Version

4.1

Component

Code

Created by

🇨🇦Canada mandclu

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

Merge Requests

Comments & Activities

  • Issue created by @mandclu
  • Merge request !124Modify parent output → (Open) created by mandclu
  • Status changed to Needs review 6 months ago
  • Status changed to Needs work 6 months ago
  • 🇩🇪Germany mrshowerman Munich

    I see an issue with recurring dates: additional empty rows are added for each following date item.

  • 🇨🇦Canada mandclu

    I was able to solve the empty rows, but there are still some issues with the "Add another item" and "Remove" buttons working as expected. We'll probably need to override some/all of addMoreSubmit(), addMoreAjax(), deleteSubmit(), and deleteAjax() from the WidgetBase class.

  • 🇧🇪Belgium dieterholvoet Brussels

    This MR fixes two issues for me:

    • The remove button being missing
    • Not being able to remove existing field rows
Production build 0.71.5 2024