piping a URL to be a clickable link

2,938 views
Skip to first unread message

Brian

unread,
Oct 29, 2021, 3:21:41 PM10/29/21
to redcap open
Hi all, 

Anyone know how to pipe a URL from a text entry field on one form to be a clickable link on another form?

Thanks,
Brian

Simon Vanderschaeghe

unread,
Oct 29, 2021, 3:35:07 PM10/29/21
to Brian, redcap open
Hi Brian,

You can use HTML, in this example the URL is stored in the variable [url]:
<a href='[url]' target='_blank'>Friendly link name</a>

Kind regards,
Simon

From: redca...@googlegroups.com <redca...@googlegroups.com> on behalf of Brian <briane...@gmail.com>
Sent: Friday, October 29, 2021 9:21:41 PM
To: redcap open <redca...@googlegroups.com>
Subject: piping a URL to be a clickable link
 
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/ff6a28ec-c53e-4966-a144-c0ca0d8a54e2n%40googlegroups.com.

Peter Macisaac (POP)

unread,
Oct 29, 2021, 3:48:52 PM10/29/21
to Brian, redcap open
Brian,

the HTML syntax for a clickable link looks like this

<p><a title="Click link" href="http://www.google.com" target="_blank" rel="noopener">Google</a></p>

(This was extracted from playing with the RICH TEXT EDITOR on the REDCap form, and with the onset of this editor function there is less need to learn HTML (in the past I used to also use ONLINE HTML EDITOR to format my text, and sometimes still do if the built in editor lacks power or gives a result that is not quite right)

It will open an external link to Google in a new window and the value of the clickable link is “Google’ presented as a hyperlink

Your task is to insert your URL into the highlighted bit of the text below

 

<p><a title="Click link" href="http://www.google.com" target="_blank" rel="noopener">Google</a></p>

I would try something like this with piping
 

<p><a title="Click link" href=“[your event name][your URL field name]" target="_blank" rel="noopener">Google</a></p>

There is also the option of using a concatenate function

Will be interested to see how others on the group would do this


Peter Macisaac






Brian Bunnell

unread,
Oct 29, 2021, 3:55:11 PM10/29/21
to Simon Vanderschaeghe, redcap open

Thanks, Simon, this worked! Taking it one step further…I’m storing audio files in box and linking to them from the REDCap instrument where my coders are entering their ratings (the reason for my original question). Box has a an audio player widget that you can copy the iframe code for by right clicking the audio file etc...I’d love to be able to enter that iframe code into a text box in another instrument and pipe that variable to the coding instrument and have the widget appear there. This will keep everything in REDCap and the coders from having to access the audio in a different tab. Any ideas?

 

Brian

Peter Macisaac (POP)

unread,
Oct 31, 2021, 4:25:49 PM10/31/21
to Brian Bunnell, Simon Vanderschaeghe, redcap open
Brian,

Normally you have to just try to do stuff like this and see if it works. Have you had a go?

Here is a link to a tutorial on Iframes


Try inserting your iframe code into the format that Simon and I described earlier

Peter



Brian Bunnell

unread,
Nov 1, 2021, 10:09:44 AM11/1/21
to Peter Macisaac (POP), Simon Vanderschaeghe, redcap open

Hi Peter,

 

Yep. I’ve been trying for a couple of weeks without luck. That being said, I’m not too savvy with HTML.

 

Thanks for the link!

 

Brian

Peter Macisaac (POP)

unread,
Nov 6, 2021, 6:29:42 PM11/6/21
to Brian Bunnell, Simon Vanderschaeghe, redcap open
Brian,

I did try to use iframe

Seems that REDCaps HTML capability doesn’t support this

however

You can put in a link that opens a new page in the tab next to the form

The user can then return to the form easily with cut and paste if the result of the search is needed







Reply all
Reply to author
Forward
0 new messages