Home Forums Front-end Issues Front-end form Google Maps in Tab


Front-end form Google Maps in Tab

  • Hi There,

    I’ve been searching for a solution, but haven’t found one. I using the acf frond-end form in a bootstrap Tab, and since it is hidden on the time that the page loads, the map isn’t initializing correctly.

    I found some solutions to this problem for the map you create yourself, like explained here:

    But that didn’t fix the problem, since it is the actual field. I also tried
    google.maps.event.trigger(map, “resize”)

    When the tab opens, but that doesn’t work either.

    How do i get the map to show correctly? Thanks in advance!

  • Hi @len

    ACF store the Google Maps field object in the acf.fields.google_map object. So, I believe you can resize it like this:

    google.maps.event.trigger(, 'resize');

    I hope this helps 🙂

  • You are an absolute hero! Works like a charm:)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Front-end form Google Maps in Tab’ is closed to new replies.