- Posts: 43
- Thank you received: 1
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
- Topic Author
- Offline
- Senior Member
Less
More
3 years 2 days ago - 3 years 1 day ago #214135
by arnaudbore
Include response to a previous question into URL was created 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:
{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
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
Attachments:
Last edit: 3 years 1 day ago by arnaudbore.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
3 years 1 day ago #214138
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Include response to a previous question into URL
I see two equation question. The first contains it own questioncode as content.
The second is showing errors.
So {urlID} would be correct, if urlID would be the questioncode of a real question and not an equation question.
I
The second is showing errors.
The part {get(urlID)} isn't correct. To place the answer of a previous question inside a URL you just use {questioncode}URL Screening: <a href=" dev.sitepro.app/limesurvey/index.php/adm...27513/id/{get(urlID) }
/browselang/">link</a>
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12789
- Thank you received: 3940
3 years 1 day ago #214146
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Include response to a previous question into URL
Hi,
your approach is really confusing.
First you say
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"?
your approach is really confusing.
First you say
So what for do you create this first equation?This URL would have a variable that would come from another question.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 1
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
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
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12789
- Thank you received: 3940
3 years 1 day ago #214152
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Include response to a previous question into URL
As I said before, you cannot display both questions on the same page.
Your setting was "all on one page".
So don't use this equation, but enter it where you display the link.
Here in a question of type "text display".
Your setting was "all on one page".
So you display the link somewhere.user can download the pdf by just clicking on the link.
So don't use this equation, but enter it where you display the link.
Here in a question of type "text display".
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- arnaudbore
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 1
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) ?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12789
- Thank you received: 3940
3 years 1 day ago #214154
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Include response to a previous question into URL
No, but usually this question is hidden.
You only display it during testing the survey
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.