Closed (fixed)
Project:
Webform
Version:
6.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Sep 2021 at 21:48 UTC
Updated:
7 Dec 2021 at 18:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jedihe commentedPatch attached; basic testing was done with both a custom composite as well as a 'webform_telephone' composite element.
Comment #4
jrockowitz commentedComment #5
jrockowitz commented@jedihe Thank you for making the feature request and posting the initial patch.
To make this a fully supported feature, I did some refactoring and added test coverage.
One piece of constructive feedback, PHP array-related methods (i.e. array_walk, array_column, array_keys, array_value, and array_reduce), can make it hard to understand the code compared to simply looping an array and building the desired result. @see WebformExcludedElements::getElements
Changes include...
#exclude_compositeproperty toWebformExcludedElementsWebformExcludedElementsand createWebformExcludedElements::getElementsmethod.webform.element.excluded_elementslibrary to style and enhance excluded composite elements.WebformSubmissionFormWebformSubmissionFormand createdWebformSubmissionForm::getLastSubmissionDataWebformElementExcludedElementsTestWebformSettingsAutofillTestComment #7
jrockowitz commentedManual steps to review
Add telephone composite to default contact webform
Enable autofill of only the telephone type sub-element
Generate a test submission
Confirm that only the telephone type sub-element is auto filled
Comment #9
jrockowitz commentedI am merging this so that I can address #3239258: Autofill: add support for current/any source entity. If you see any issues please post them here.
Comment #11
jedihe commented@jrockowitz: thanks so much for pushing this to completion! and thanks for taking the time to provide constructive feedback :).