Accessing piped text responses as source code (for iframe) or hyperlink | XM Community
Solved

Accessing piped text responses as source code (for iframe) or hyperlink

  • 16 February 2019
  • 2 replies
  • 30 views

Hi all! I'm working on a survey, and would like a way to make a specific web page appear on a question. The plan is to put the webpage in an iframe, but there's one major issue I'm running into. I would like to use piped text from an earlier question to determine what webpage appears in the iframe.

More precisely, in an earlier question, participants are asked (via text entry) to enter their twitter handles (i.e. "Qualtrics"). Twitter urls have the simple property of following the format https://twitter.com/whatever, so the twitter page for qualtrics is https://twitter.com/Qualtrics. Ideally, we would show participants an embedded view of their own twitter page, so if they entered their twitter handle, "i_am_stuck_on_this_problem" on the earlier question, then the iframe would display the web page at https://twitter.com/i_am_stuck_on_this_problem.

Does anyone have an idea for how to access piped text answers as part of the source code? Or even if that's not possible, is there any way to access piped text answers as a hyperlink? It wouldn't be as good as an embedded webpage, but putting a valid hyperlink to their page on that question would be the next best thing. It may be impossible, but I figured before I gave up I'd try asking the gurus. Any input is appreciated.

I looked around to see if anyone had asked a similar question, but I confess my search wasn't completely exhaustive. Many apologies if a similar question has already been addressed elsewhere.
icon

Best answer by TomG 16 February 2019, 14:38

View original

2 replies

Userlevel 7
Badge +27
You can pipe it into your iframe html:
```
<iframe src="https://twitter.com/${q://QID1/ChoiceTextEntryValue}"></iframe>
```
Wow, duh. I've been working on this more, and I think it may even have been a moot point, since it seems like twitter has disabled the ability to embed their pages in iframes anyway. Still, thanks a ton for the answer, that should make the linking painless.
Thanks, TomG.

Leave a Reply