Tuesday 15 March 2016

Drupal 7 webform output country name instead of country code in webform country list


Drupal 7 webform output county name webform country list

What I have is the Country Codes being sent in emails where I want the country names.  This is using the module 'Webform Country List'
I feel like I should have been able to solve this with the module https://www.drupal.org/search/site/address%20field%20token  but couldn't get that to work.  If anyone knows how this is done then please let me know. 

So I've created a module that will do this for you and can be found at Drupal 7 Webform Country Token Names 

The code in this module is reliant on the fact the fieldname is 'country'  - if it isn't you'll either need to change the field name or customise this code.

No comments: