I'm currently writing a Webform component that utilizes Addresses module. I'd like to add specialized theming in this module, providing basic theming for the #type => 'addresses_element'. Unfortunately it looks like any changes to the markup of the form will cause the JavaScript within Addresses to break. This patch uses a more robust approach that will work no matter how many wrappers are added/removed to the form elements. It also moves the addition of the JavaScript file to the theme function, so that the entire behavior of JavaScript-enabled address fields may be written if desired (for example I'd like to always show the Province field regardless of if it's been populated with a province list or not).
This approach will allow for better theming of address elements and if desired, entirely different approaches to handling dynamic lists of provinces.
| Comment | File | Size | Author |
|---|---|---|---|
| addresses_js.patch | 1.81 KB | quicksketch |