URL in a (eg text/graphic) widget that opens a new window | XM Community

URL in a (eg text/graphic) widget that opens a new window

  • 15 November 2022
  • 17 replies
  • 132 views

Userlevel 5
Badge +11

Hi All,
Is there a way I can use the Link option in a text/graphic widget that when you click on the hyperlink it will open a new window? I'd like to reference some help documents for certain widgets and it would be nice to be able to provide a link which opens up a new window so that you don't navigate away from the page.
If the hyperlink function doesn't work, is there another way to perhaps trick Qualtrics and give it some html code

I know there was some way to put HTML code inside either the data settings fields or the translation part of the dashboard settings (eg different colours) [although I've never used that technique] and there is a way to do silent characters (ie empty titles) in widgets / metric titles so pehaps there is a way put HTML code in to create a custom link?

Thanks in advance

Rod Pestell


17 replies

Userlevel 5
Badge +25

Hi Rod_Pestell,
Does setting the "Target" option for the Link solve this?
image.pngHope that helps!

Userlevel 5
Badge +11

HI bgooldfed,
Thanks for replying. The image you posted isn't coming through so I'm guessing what you mean by setting the target option? As far as I'm aware you can only provide a url link and nothing else when you use the link function in a text/graphic widget, unless I've missed it?!
Can you re-post the image in case this might show me what I need to do?
Thanks in advance
Rod Pestell

Userlevel 7
Badge +36

Rod_Pestell
The image provided by bgooldfed seems to be from survey rich content editor and not a rich text widget.
The target=_blank does not work as rightly said by you we only get an option to enter URL.
This new window approach can only be done if you're using some other widget where you can include a data source and within survey embedded data have the HTML of hyperlink as value of the embedded data. Something like below and include this to show the link.
image.pngHope it helps!

Userlevel 5
Badge +25

https://community.qualtrics.com/XMcommunity/discussion/comment/52248#Comment_52248I've reposted the image at the link below with some extra steps. This assumes you are using the Text/Graphic question type in a survey.
https://imgur.com/a/V9b5AVn

Userlevel 5
Badge +11

Hi both - thanks for the replies
That's correct - it's not a survey question i'm needing the link in but a dashboard widget.
It's to give users a link to some support pages. In a text/graphic widget you have a hyperlink option but it won't create a new tab or window meaning you'll move away from the current dashboard which will frustrate the end user no doubt as they'll have to navigate back to it and scroll down to to where they were last.
Deepak just to confirm - if I create an empty survey and in a question write in the HTML code (which then enables me to use the Target option). I can use that in a widget on a dashboard then? say a simple table or record grid widget and it will then display the friendly text and when you click on it, it will open in a new window?
This sounds a good work around as I could collect all my support page links and then reference them. Trouble is I'd need to make sure I can add it to the dashboard settings as I've already a number of sources.
Thanks

Rod Pestell

Userlevel 7
Badge +36

Rod_Pestell
Yes, you can do that and it works perfectly in a record grid widget, you can do all sorts of customizations in the new link survey which you create and append that src value to an embedded data and map accordingly. Something like this you can modify as you want.
MicrosoftTeams-image (11).png
Hope it helps!

Userlevel 5
Badge +11

Cool, thanks - I'll start planning my links!! :)

Thanks again.

Rod Pestell

Userlevel 5
Badge +11

Hi Deepak
Have been looking into this and wondered if there is a way to use a script in this manner and not just a href url link. By way of script I mean to send a pulse (if that's the right term) a server so that it can register when the URL / dashboard page has been viewed and maybe even by the the viewers ID?
realise this maybe taking things a lot further than simply providing a clickable link but just wondered if this might be possible. I'm trying to get more granular reporting for dashboards, specifically for pages
Any thoughts on this would be most welcome
Thanks
Rod Pestell

Userlevel 7
Badge +36

https://community.qualtrics.com/XMcommunity/discussion/comment/53411#Comment_53411That's a nice use case and would be difficult to achieve but need to keep in mind the character limit of embedded data. Also, we need to modify the value to have onclick function which would be href as well as onclick where we could include the entire script.
Something like this StackOverflow page suggest, but doubtful on getting the viewers id as that is something you need to get from either the data layer of the website you're redirecting them to or some other way. The same JS would have to call an API as well to get the viewer id back in response for which you would need response id as well or if you some other way in mind or some place else you would like to store it just as new record.
Hope it helps!

Userlevel 5
Badge +11

Hi Deepak
Thanks for that - so it sounds feasible (except as you say the embedded data limit may be a problem). Re the onlick though, that wouldn't quite do what I would need as I would want the script to run when the page loads. Id there a way to do that or is href our only way in which thus means an onclick (ie end user) action is the only thing possible.
Thanks
Rod Pestell

Userlevel 7
Badge +36

https://community.qualtrics.com/XMcommunity/discussion/comment/53438#Comment_53438Yes, i think onload function can be used instead of onclick. Still pushing data back would be a task.

Userlevel 5
Badge +11

https://community.qualtrics.com/XMcommunity/discussion/comment/52249#Comment_52249Hi Deepak,
Managed to give this a go but using colours or a link. The Link works well so I can try and work on creating a window for that. However the colours / Style syntax doesn't work which is a shame. Do you know if anything else other than href can work in the embedded data field. It's a pitty Stlye / CSS doesn't work so i'm assuming this is going to be just limited to hyperlinks?
Thanks
Rod Pestell

This is the survey response I created

image.png So it looks ok there

IN the record grid the hyperlink opens up google in a new winoow but no colours show through which is a shame.
image.png
when you inspect it - it does look like it's parsed the value injected in teh survey flow as it added in a rel value (what ever that is!).

image.png

Userlevel 5
Badge +11

PS - I did also try and import the same through a CSV import as a source but it doesn't like double quotes inside each other which is required if you don't want it to be taken as a delimiter.

Userlevel 7
Badge +36

https://community.qualtrics.com/XMcommunity/discussion/comment/55291#Comment_55291I understand the issue and it does pick up the style you just need to write it as below:
This is green
Hope it helps!

Userlevel 5
Badge +11

ok, Gave it a go but still no luck, the href is still removing the colours by the looks - at least the hover over title is letting me do a tooltip with new lines.

I tried your version (bottom line in screen shot) and some other versions
image.pngmsg03:
This Is Green and Red
image.pngimage.png
so it seems to still be removing the styling withint the HTML and there is a CSS for (anchor?) which is also overriding things.
I checked the html in html fiddle and it worked there
image.pngHope there is a simple solution. even if it's just possible to add test of different colours and then have a link at the end I guess would be good but so far nothing seems to be coming through.
Thanks
Rod Pestell

Userlevel 7
Badge +36

https://community.qualtrics.com/XMcommunity/discussion/comment/55307#Comment_55307I was able to pull one colored text with the link. As below:
Not sure where you are facing the issue.
image.pngHope it helps!

Userlevel 5
Badge +11

What widget are you using?
aha... when I go into the full record the colours are there

image.png
Just figured it out - it's because I was using the New Record Table widget. The (old) Record Grid is showing the colours just great. So it's due to the widget! 😞 and they are going to be removing the Record grid widget soon I gather.

image.png
So the engineers are removing all HTML coding. That's not nice of them is it!
Have you managed to get this working with any other widgets? I'm trying various other field types and widgets but haven't found any combination that works.
So the idea of being able to inject HTML code is soon going to end by the looks. :(

Thanks
Rod Pestell
image.png

Leave a Reply