Link to map in notification email not working

Hi everyone,

I found a similar issue discussed here: Link to Map in Notification Email - Resolved.

I’m using Address Fields along with the “Autocomplete” perk, which works great on my form. For email notifications, I use the {all_fields} merge tag since my form contains around 100 questions, and I only need the submitted responses in the email.

However, in the notification email, there’s a clickable URL labeled “Map It” displayed just below the address. When I click it, the link doesn’t work. It redirects to a long GUID URL starting with “url6011” instead of a Google Maps link.

While I don’t need this feature, it would be nice to have it working.

So, my questions are:

1. How can I remove the “Map It” link from the email?
I’ve already tried this snippet, but it didn’t work.

2. How can I fix the “Map It” link so that it works correctly?

Thanks in advance for your help!

Ben

Hi Ben,

  1. While you’d like to remove the “Map It” text, what new text would you like to use?
  2. Did the third code not work for you from the following post?

Thank you for your reply!

I might not have been clear earlier—I simply want to remove, hide, or delete the text from the email notification so it’s not included at all.

However, since I can’t create a custom email notification (due to the large number of fields, with only about 50% of them being filled, which I forgot to mention), I have to use the {all_fields} tag in the email layout. Unfortunately, this tag automatically includes the “Map it” text.

As for your second question, I’m not entirely sure where to place the code.

If I create a new email notification message, insert {all_fields}, and also add the code you mentioned (<a href="https://www.google.com/maps?q={Street:1},{City:2},{Country:3}">Map It</a>), wouldn’t both the non-working “Map it” text (included via {all_fields}) and the functional version from the code appear in the email?

I hope that makes sense and isn’t too confusing! :blush:

You can make use of the filter gform_disable_address_map_link:

add_filter( 'gform_disable_address_map_link', '__return_true' );
2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.