Hey what's the trick to get to open a link in a new tab when modifying a Phrase?
I tried adding target="_blank" but it keeps getting sanitized...
Hey what's the trick to get to open a link in a new tab when modifying a Phrase?
I tried adding target="_blank" but it keeps getting sanitized...
Hey
I do think it generally should be possible to ‘force’ the behaviour by adding some JS into your Third-Party Scripts, but it would be a little hacky.
Ah, I see.
It's for the terms link on the user registration form. Our platform is private and therefore we can't link to the Terms page as users won't be able to access it. So we've created a public page on one of our sites to host those terms.
So I would like that link to open in a new window to prevent the users from leaving the registration form that they filled in...
Yep gotcha. I do think your only bet here is to use a Third-Party Script. Here is an example that just worked fine for me in our sandbox. Big caveat here is that I’m not a developer so please do your own testing if you decide to take this kind of approach. :)
<script>
(function () {
var HREF = "https://example.com/guide"; // exact URL
var timer = setInterval(function () {
var as = document.querySelectorAll('a[href="' + HREF + '"]');
if (as.length) {
as.forEach(function (a) {
a.target = "_blank";
a.rel = "noopener noreferrer";
});
clearInterval(timer);
}
}, 400);
})();
</script>
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.