- Posts: 33
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Pass a parameter via URL
- flink
- Topic Author
- Offline
- Junior Member
Less
More
8 years 10 months ago - 8 years 10 months ago #122066
by flink
Pass a parameter via URL was created by flink
Hello,
I'm trying to pass a parameter to my survey via URL, so that a short text field is prefilled. I tried the following, but it didn't work.
example.com/limesurvey/index.php/761854?name=abc
"name" is the text field’s qcode. What am I doing wrong?
Thanks for your advide!
I'm trying to pass a parameter to my survey via URL, so that a short text field is prefilled. I tried the following, but it didn't work.
example.com/limesurvey/index.php/761854?name=abc
"name" is the text field’s qcode. What am I doing wrong?
Thanks for your advide!
Last edit: 8 years 10 months ago by DenisChenu. Reason: example.com is done for this
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
8 years 10 months ago - 8 years 10 months ago #122071
by steve_81
Replied by steve_81 on topic Pass a parameter via URL
Hi,
according to the manual: "It's important to add "newtest/Y" to the link" ( manual.limesurvey.org/Workarounds:_Surve...using_the_survey_URL )
Maybe then it works.
example.com/limesurvey/index.php/761854/newtest/Y?name=abc or
example.com/limesurvey/index.php/survey/index/sid/761854/newtest/Y?name=abc
Greets
Stefan
according to the manual: "It's important to add "newtest/Y" to the link" ( manual.limesurvey.org/Workarounds:_Surve...using_the_survey_URL )
Maybe then it works.
example.com/limesurvey/index.php/761854/newtest/Y?name=abc or
example.com/limesurvey/index.php/survey/index/sid/761854/newtest/Y?name=abc
Greets
Stefan
Last edit: 8 years 10 months ago by DenisChenu. Reason: example.com is done for example
The following user(s) said Thank You: flink
The topic has been locked.
- flink
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 1
8 years 10 months ago #122072
by flink
Replied by flink on topic Pass a parameter via URL
Hey Stefan,
thank you very much, it works just as planned!
Greets
Benjamin
thank you very much, it works just as planned!
Greets
Benjamin
The topic has been locked.
- mfeher
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
8 years 9 months ago #122260
by mfeher
Replied by mfeher on topic Pass a parameter via URL
This solution is not working for me, I have tried a number of solutions suggested in the workarounds
Survey URL is
myurl.ca/index.php?r=survey/index/sid/123456/lang/en
Survey id = 123456
Question Group ID = 1
Question ID = 20
Question CODE = T0
And I can not seem to locate the Limesurvey Version# to see if it is 1.80, 1.92, 2.0 or other
Survey URL is
myurl.ca/index.php?r=survey/index/sid/123456/lang/en
Survey id = 123456
Question Group ID = 1
Question ID = 20
Question CODE = T0
And I can not seem to locate the Limesurvey Version# to see if it is 1.80, 1.92, 2.0 or other
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
8 years 9 months ago #122278
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Pass a parameter via URL
@mfeher, what question type are you trying to pre-populate?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- mfeher
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
8 years 9 months ago #122298
by mfeher
Replied by mfeher on topic Pass a parameter via URL
Thank you Tom. The question is Short Answer format. I am populating it with a value from another system, and actually managed to resolve the issue with the format of the URL. I ma
survey.myurl.ca/index.php?r=survey/index...newtest/Y&T0=1234567
or
survey.myurl.ca/index.php?r=survey/index...Y&12345X1X20=1234567
Thank you to Denis who assisted
I added the full URL into an email template which is sent automatically based on specific criteria as follows:
survey.myurl.ca/index.php?r=survey/index...ewtest/Y&12345X1X20= [token]sytem_table_field_name[\token]
survey.myurl.ca/index.php?r=survey/index...newtest/Y&T0=1234567
or
survey.myurl.ca/index.php?r=survey/index...Y&12345X1X20=1234567
Thank you to Denis who assisted
I added the full URL into an email template which is sent automatically based on specific criteria as follows:
survey.myurl.ca/index.php?r=survey/index...ewtest/Y&12345X1X20= [token]sytem_table_field_name[\token]
The topic has been locked.
- potvorko
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #122523
by potvorko
Replied by potvorko on topic Pass a parameter via URL
Hi. I have the same problem, and tried all the solutions suggested here, as well as those on the "lime survey manual", without any results.
My one field survey running on limeservice:
potvorko.limequery.com/index.php/183169/lang-en
I want to pre-fill the one short-answer question with some value passed through the URL:
The question's SGQA id is: 183169X2X5. The code is: Q1. It sits in a Question Group with code: QG1
I tried many combinations of the url including these ones, with no luck:
potvorko.limequery.com/index.php?r=surve...Y&183169X2X5=twonine
potvorko.limequery.com/index.php/183169/...Q1=twonine&newtest=Y
Any ideas?
thanks.
My one field survey running on limeservice:
potvorko.limequery.com/index.php/183169/lang-en
I want to pre-fill the one short-answer question with some value passed through the URL:
The question's SGQA id is: 183169X2X5. The code is: Q1. It sits in a Question Group with code: QG1
I tried many combinations of the url including these ones, with no luck:
potvorko.limequery.com/index.php?r=surve...Y&183169X2X5=twonine
potvorko.limequery.com/index.php/183169/...Q1=twonine&newtest=Y
Any ideas?
thanks.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 9 months ago #122527
by DenisChenu
After
index.php/183169/lang-en?Q1=twonine&newtest=Y
index.php/183169/lang-en?183169X2X5=twonine&newtest=Y
Must do the trick
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Pass a parameter via URL
I'm not sure, but try to deactivate "Captcha", i think it can break prefilling urlpotvorko wrote: ....
potvorko.limequery.com/index.php?r=surve...Y&183169X2X5=twonine
potvorko.limequery.com/index.php/183169/...Q1=twonine&newtest=Y
....
After
index.php/183169/lang-en?Q1=twonine&newtest=Y
index.php/183169/lang-en?183169X2X5=twonine&newtest=Y
Must do the trick
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- potvorko
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #122554
by potvorko
Replied by potvorko on topic Pass a parameter via URL
Yes, deactivating the captcha, front-page, and token authentication makes the URL parameter passing work.
But I would like to continue to filter robots and non-authentic users, and still be able to pass URL parameters.
Any way to have Captcha be enabled at the end of the session, after pressing the send/save button, for example? Or any other suggestions?
But I would like to continue to filter robots and non-authentic users, and still be able to pass URL parameters.
Any way to have Captcha be enabled at the end of the session, after pressing the send/save button, for example? Or any other suggestions?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 9 months ago #122559
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Pass a parameter via URL
Hi,
I never have robots without Captcha, i don't understand why robits come click on next, click on next X times ???
But actually : if you need Captcha + URL param : make a bug report ....
Denis
I never have robots without Captcha, i don't understand why robits come click on next, click on next X times ???
But actually : if you need Captcha + URL param : make a bug report ....
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- potvorko
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #122560
by potvorko
Replied by potvorko on topic Pass a parameter via URL
Not helpful. And very cryptic (what does "i never have robots without Captcha" mean?). Anyway, this is not a bug, but if you want to report it as such, go for it.
Anyone else with suggestions or examples on how URL param passing can work with authenticated users?
Anyone else with suggestions or examples on how URL param passing can work with authenticated users?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 9 months ago #122562
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Pass a parameter via URL
I never have robots without Captcha mean : on any of mine survey OR client survey have "robots", i never use Captcha in any survey i manage.
authenticated users => Use token manual.limesurvey.org/Tokens , and use Attribute for managing information.
Denis
PS: i don't report bug if i don't need it . Sometimes, i fix bug i report or another user report. I think you can report it as bug. If you don't want to report : no problem for me ....
authenticated users => Use token manual.limesurvey.org/Tokens , and use Attribute for managing information.
Denis
PS: i don't report bug if i don't need it . Sometimes, i fix bug i report or another user report. I think you can report it as bug. If you don't want to report : no problem for me ....
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.