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.
The Address module now has a form element. It would be great to add support for it in webform as the state select list auto populate per country selection.
Comment | File | Size | Author |
---|---|---|---|
#4 | address_module_support-2858971-3.patch | 37.27 KB | jrockowitz |
Comments
Comment #2
anpolimusComment #4
jrockowitz CreditAttribution: jrockowitz at The Big Blue House commentedOkay, so I started to work on this and concluded that it is going to incredibly difficult to add full support for the Address module.
The Address module does provide an Address form element, which was pretty easy to get working as a webform element, the problem is all the address display logic (ie preprocessing and rendering) is baked into the Address field formatters. The Webform module would have to duplicate and support all this custom formatting code.
This is not something I am willing to maintain in the core Webform module. Any Address module integration will have to handled in dedicated Webform Address module.
I am going to close this ticket. Someone can create an experimental Webform Address module if they want this feature.
Attached is the patch that I started to work on which includes some refactoring to composite elements. I am not even sure it is good starting point.