CAWI - How To Add a link that opens a file in a new tab

 

There are cases where you would want to add to certain questions a link that would allow the respondent to refer to a document that serves as a Help or includes instructions on answering the specific question. 

There are various ways to perform it and we will share here 2.

 

Adding a link to a shared document (Google Docs etc.)

Use the following steps to implement it if your document is a shared document that can be accessed from any common browser:

  1. Upload the file to a shared folder
  2. Generate a link that is used to access it from a browser. Assume that this link is
    https://myserver/mydoc.pdf
  3. Add a question place holder to your question text. For example set your question text to be:
    Please answer this question carefully. How are....?

    {0}
  4. Add this code to your start script of the question
    SetTextFormat(CurrQues, "<a href = 'https://myserver/mydoc.pdf' target=\"_blank\"> Help Document </a>");

Adding a link to a document that is attached to the survey

Use the following steps to implement it if you added your document as an attachment to the survey:

  1. Attach the file to a your Survey
  2. Add a question place holder to your question text. For example set your question text to be:
    Please answer this question carefully. How are....?

    {0}
  3. Add this code to your start script of the question
    SetTextFormat(CurrQues, "<a href = '\dblstgatc://" + GetAttachmentID("mydoc.pdf")+ "\' target='_blank'> Help Document </a>");

     

Thats it!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.