Closed (works as designed)
Project:
Webform Hints
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2016 at 15:00 UTC
Updated:
8 Jun 2016 at 13:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
socialnicheguru commentedI added a patch because some elements do not have labels or titles. I am not sure if it is by design or not.
An autocomplete textfield is a good example. Webform_addressfield_extras returns an autocomplete text field without labels.
Comment #3
socialnicheguru commentedPlease use this patch instead.
Comment #4
socialnicheguru commentedComment #5
socialnicheguru commentedhmmm. I wonder if it is a problem with addressfield_tokens https://www.drupal.org/node/2570653
Comment #6
guschilds commentedSocialNicheGuru,
By default the module only supports these types of Webform components: textfield, textarea, webform_email, webform_number, and select. Were you using
hook_webform_hints_fieldtypes_alter()to add addressfield components to that list? That looks to be the only way you could've gotten to line 192 with that type of component to get the error you're showing. If not, please provide thorough steps to reproduce that we an try.It isn't that it's really a problem with addressfield_tokens, it's just that this module doesn't support those components. Because the module sticks to "core" Webform components, it likely never will. In addition, adding addressfield components to the list of supported components using
hook_webform_hints_fieldtypes_alter()may cause the error you've reported because the component's array has a unique structure.Getting it to work with addressfield components will require code similar to that in #2570653: webform_hints support, whether that patch gets committed to addressfield_tokens or is custom code elsewhere in your codebase (it's implementing
hook_webform_hints_element_alter()and custom code can do the same). Does that make sense?I'm going to close this as "works as designed", but please reopen if you end up thinking there is an issue with this module and can provide steps for us to get there. Thanks!