1. Home
  2. Knowledge Base
  3. Customization
  4. Open a Link Custom Field in a New Tab

Open a Link Custom Field in a New Tab

If you’re using a custom field of type “Link” and want the link to always open in a new browser tab, you can add a small JavaScript snippet to your site.

JavaScript
document.body.addEventListener('click', function (e) {
  const link = e.target.closest('.oum_location_custom_fields a');
  if (link && !link.target) {
    e.preventDefault();
    window.open(link.href, '_blank', 'noopener');
  }
});

You can add this snippet under Open User Map > Settings > Advanced > Custom JS.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support

EN