Hello all,
I’m using the FluentForms Pro plugin that allows you to use Google Maps API to autocomplete addresses in a leadgen form. These leadgen forms are in Bricks modals on every page of the site. I also have service area pages that use Bricks’ maps function to show the location of that service area.
On pages without Bricks maps, my leadgen autocomplete works just fine. On my service area pages, both the autocomplete and the Bricks maps do not work. Console shows:
message: "fluentform_gmap_callback is not a function"
name: "InvalidValueError"
stack: "Error\n at new be (https://maps.googleapis.com/maps/api/js?key=REDACTEDAPIKEY&libraries=places&callback=fluentform_gmap_callback&ver=4.3.25:107:207)\n at _.ee (https://maps.googleapis.com/maps/api/js?key=REDACTEDAPIKEY&libraries=places&callback=fluentform_gmap_callback&ver=4.3.25:108:87)\n at Bea (https://maps.googleapis.com/maps/api/js?key=REDACTEDAPIKEY&libraries=places&callback=fluentform_gmap_callback&ver=4.3.25:250:99)\n at https://maps.googleapis.com/maps/api/js?key=REDACTEDAPIKEY&libraries=places&callback=fluentform_gmap_callback&ver=4.3.25:249:231"
[[Prototype]]: Error
15:07:21.723
I believe this is a cache/minify/combine error, but I have tried every possible exception in my minify/cache/combine rules to fix this but without success. However, I also noted that Google Maps API will return a message in the console warning against having more than one instance of the API script in a single page. If that’s indeed the cause here, that means I would need to choose between having a Bricks map and having Google autocomplete on my leadgen form. Not ideal.
Has anyone encountered this issue, and did you find a workaround? Can anyone think of any other consideration I may have missed here?