diff --git a/addressfield_tokens.tokens.inc b/addressfield_tokens.tokens.inc index fe49775..253e986 100644 --- a/addressfield_tokens.tokens.inc +++ b/addressfield_tokens.tokens.inc @@ -97,17 +97,19 @@ function addressfield_tokens_token_info_alter(&$info) { } // Add extra text to webform submission values help. - $info['tokens']['submission']['values']['description'] .= ' -
- ' . t('For addressfield components you can also choose individual elements of the address using the syntax field_key:element, For example:') . ' - -
'; + if (array_key_exists('submission', $info['tokens'])) { + $info['tokens']['submission']['values']['description'] .= ' +
+ ' . t('For addressfield components you can also choose individual elements of the address using the syntax field_key:element, For example:') . ' + +
'; + } // Attach tokens to all address fields. $valid_types = entity_token_types();