Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
During testing of autofill, I have noticed, that it's not possible to have two groups of autofill fields.
For example:
field_one => to be source for field_one_clone
field_two => to be source for field_two_clone
I think that a feature like this would be valuable.
Comment | File | Size | Author |
---|---|---|---|
#6 | 3106856-6.patch | 10.07 KB | chr.fritsch |
| |||
#6 | interdiff-3106856-3-6.txt | 1.99 KB | chr.fritsch |
#3 | autofill-support_multiple_fields-3106856-2.patch | 9.76 KB | szeidler |
|
Comments
Comment #2
mtodor CreditAttribution: mtodor at Thunder commentedComment #3
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedThanks for your input.
You're right. The reason is, that we only had a single variable
var target_field_was_manipulated
, that state if a target was manipulated. Actually this needs to be handled per target field.I changed the javascript to be able to do that. I adopted also your scenario in the tests.
Thanks for a review.
Comment #4
bernardm28 CreditAttribution: bernardm28 commentedDoes this allow autofill from two sources? For example if one wants to autofill from the Firstname and Lastname fields.
Comment #5
chr.fritschI checked the patch and found one small problem.
I have 4 fields: one, one_clone, two and two_clone.
one is mapped to one_clone and two to two_clone.
I type something in one_clone and then into one. No overwrite of one_clone, fine.
I type something into two and nothing is copied to two_clone. That should be because two_clone is still empty.
Comment #6
chr.fritschI extended the test and fixed the bug I found.
Comment #7
volkerk CreditAttribution: volkerk at Thunder commentedI manually tested this using one source and multiple targets and also chaining multiple fields. Works as expected.
Comment #9
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedI tested patch #6 as well. Thanks for spotting and fixing the bug. It looks alright for me now and got committed.