Steps to reproduce
- Enable the module
- Configure an API key
- Create a webform
- Add a loqate field
- View the webform
Expected result
One of the form fields should trigger a lookup
Actual result
No lookup is triggered.
The loqate.js and external scripts are being added to the page, but the JS does not set up any lookups, because no elements have the class "address-lookup".
Perhaps this might be a missing documentation problem rather than a bug?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | interdiff_6-7.txt | 5.42 KB | baikho |
| #7 | loqate-no_form_elements_trigger_lookup-3027882-7.patch | 5.47 KB | baikho |
| #3 | 3027882-No-form-elements-trigger-a-lookup.patch | 5.07 KB | poornachandran |
Comments
Comment #2
malcomio commentedComment #3
poornachandran commentedThe following patch fixes the issue of populating the values. It also fixes the issue in https://www.drupal.org/project/loqate/issues/3032356.
Comment #4
poornachandran commentedComment #5
poornachandran commentedComment #6
baikho commentedHi @poornachandran,
Thanks for the patch, much appreciated!
I've tested your patch on yet latest release
8.x-1.4. This worked fine and fixes the trigger, but there is a small side effect upon clicking the address causing a search box to disappear (The search box happened to be present in the sidebar in my case).Re-rolled your patch against the new
8.x-1.xdev branch but the newly found defect is still to be fixed.Comment #7
baikho commentedWhilst revising the patch from #3 and rerolled #6, it seems that a few drastic changes were introduced that are not part of the scope of this issue so they should not be addressed here. These patch changes have been reverted:
The other defect mentioned in #6 was caused by the first option whilst instantiating the JS object:
{ element: 'search', field: '' }, this has been fixed by using a more specific selector.Raising priority as well to *Major*.
Comment #9
baikho commentedCommitted to
dev. Tagging new release.