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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

trigdog created an issue. See original summary.

anpolimus’s picture

Issue tags: +KyivCampCS17

  • jrockowitz committed 17bc0f6 on 2858971-address
    Issue #2858971: Address module support.
    
jrockowitz’s picture

Status: Active » Closed (won't fix)
FileSize
37.27 KB

Okay, 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.