Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Include response to a previous question into URL

  • arnaudbore
  • arnaudbore's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 2 days ago - 3 years 1 day ago #214135 by arnaudbore
Dear limesurvey experts,

I try to have a equation question that would be an URL. This URL would have a variable that would come from another question.
So far I was not able to get the response from another question and end up with this %3Cspan%20id='LEMtailor_Q_228_5'%3E1%3C/span%3E instead of the number that what suppose to be included.

My URL question looks like this: 

URL Screening: <a href=" dev.sitepro.app/limesurvey/index.php/adm...yid/927513/id/{urlID }
/browselang/">link</a>


{urlID} is a equation question just before urlScreening

You can have a example following this link  . I also attached a lss structure to give you an idea.

Thank you in advance for your help.
Arnaud
 
Last edit: 3 years 1 day ago by arnaudbore.
The topic has been locked.
More
3 years 1 day ago #214138 by jelo
I see two equation question. The first contains it own questioncode as content.
The second is showing errors.

URL Screening: <a href=" dev.sitepro.app/limesurvey/index.php/adm...27513/id/{get(urlID) }
/browselang/">link</a>

The part {get(urlID)} isn't correct.   To place the answer of a previous question inside a URL you just use {questioncode}
So {urlID} would be correct, if urlID would be the questioncode of a real question and not an equation question.

I

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago #214146 by Joffm
Hi,
your approach is really confusing.

First you say

This URL would have a variable that would come from another question.

So what for do you create this first equation?
This equation has a constant value "{urlID}" that is empty when the question is displayed, and stays empty (if you do not assign something by another equation)
If the "other question" has code "Q1", yout url is stored in "Q1".

Now your second equation.
What do you try here?
Do you want to display a link?
This you should do in a question of type "text display" or any other question, but not in an equation.
Besides that it is wrong syntax, only {urlID}, you cannot display these on one page.

So with "urlID" as question of type "short text" and your question "url" as "text display" and display "question by question" I get this:
   

and this is the link:


Joffm

PS.
​​​​​​​What is this "browselang"?

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • arnaudbore
  • arnaudbore's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 1 day ago #214149 by arnaudbore
Replied by arnaudbore on topic Include response to a previous question into URL
Thank you for the quick response. Sorry for the confusion.

Here is a clearer workflow:
First, I give a link to a participant with an ID within the URL like this one:  dev.sitepro.app/limesurvey/index.php/594...=2&newtest=Y&lang=fr
My goal is to give a link to a response from another survey. I'm taking the ID and put it in the first question (using the panel integration) as a short text to show that I'm able to grab it from the url.
Then in a second question (equation) I include this value into an url. I don't want to display the whole URL I just want a link so the user can download the pdf by just clicking on the link.

I pretty sure I'm missing something and surely I don't use the panel integration correctly.

I attached a new version.

Thank you very much for your help.
Arnaud

PS: I just copied the link provided in response and end up with browselang. Don't need it and I fixed it in the lss attached
 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago #214152 by Joffm
As I said before, you cannot display both questions on the same page.
Your setting was "all on one page".

user can download the pdf by just clicking on the link.

So you display the link somewhere.
So don't use this equation, but enter it where you display the link.

Here in a question of type "text display".

 

File Attachment:

File Name: limesurvey...8825.lss
File Size:22 KB




 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • arnaudbore
  • arnaudbore's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 1 day ago #214153 by arnaudbore
Replied by arnaudbore on topic Include response to a previous question into URL
Can I use the ID provided by the URL I give to the participant like this one: dev.sitepro.app/limesurvey/index.php/594...=2&newtest=Y&lang=fr and put it directly into the link without displaying the whole link ?

In other words: if I get rid of the first question is there a way to take the ID (in the URL) and put it directly into the link (as an equation) ?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago #214154 by Joffm
No, but usually this question is hidden.
You only display it during testing the survey

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose