Add support for paragraphs

Created on 5 February 2025, 4 months ago

Problem/Motivation

Thank you for the great module. I was looking on autofilling fields in a paragraph but this is not supported as the js only looks for name="${sourceField}[0][value] while a field in a paragraph is put in a subform for example [name="field_paragraphs[0][subform][${sourceField}][0][value]"]. So to support this functionality in paragraphs, this should be changed.

Steps to reproduce

Install module and try to autofill fields on paragraphs.

Proposed resolution

Pass on the entity type for where the field is attached.
Alter the js to use an adjusted name selector.

Remaining tasks

Create MR
Review MR
Merge MR

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

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

Merge Requests

Comments & Activities

  • Issue created by @tim-diels
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Added support for paragraphs but the delta needs to be made dynamical so it does not picks only the first paragraph.

  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #415485
  • Pipeline finished with Success
    4 months ago
    Total: 149s
    #415611
  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #415628
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Adjusted the code so it allows to support paragraphs on a dynamic manner by passing on the field parents.

  • Pipeline finished with Success
    4 months ago
    Total: 141s
    #420805
  • Status changed to Needs work 13 days ago
  • 🇩🇪Germany szeidler Berlin

    Sorry for my late feedback. It looks very good and I like to see it in the module. Would you mind adding an automated test for the paragraph support?

Production build 0.71.5 2024