- Issue created by @noahterp
The submission handler form for this module requires an "Email field" to be selected. The options for that select box should list all email fields within the webform. However, it only looks for email fields at the top level of the form hierarchy, not anything nested within a container or flexbox layout. This makes it difficult to provide more complex layouts and groupings of fields.
Within your webform, add any container element (fieldset, details, etc) or Flexbox layout. Then drag your email field within this element.
This field is no longer an option within the MyEmma submission handler's "Email field" select box. And if this is your only email field, then the submission handler cannot be submitted because the select field is required.
Within WebformMyEmmaHandler.php β buildConfigurationForm(), change
$fields = $this->getWebform()->getElementsDecoded();
to
$fields = $this->webform->getElementsInitializedFlattenedAndHasValue();
As seen in the next code block, this will flatten the hierarchy to find all email fields. Probably code some optimizations so it does not duplicate the $elements
variable too.
Create merge request/patch.
Test change to ensure the correct field is still submitted.
None
None
None
Active
1.1
User interface