Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Can I pass a parameter to a survey through a query string?

Can I pass a parameter to a survey through a query string? 3 years 7 months ago #73242

  • eadamuk
  • eadamuk's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Hi All,

I'm trying to use limesurvey as a simple job application site. I'd like to create one application form, but pass to it a variable in the query string when it first loads stating which job they are applying for- perhaps displaying that at the top of the form, and then passing it through with the results at the end.

Thanks,
Adam
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 7 months ago #73244

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 3690
  • Thank you received: 498
  • Karma: 162
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
The following user(s) said Thank You: eadamuk

Can I pass a parameter to a survey through a query string? 3 years 7 months ago #73259

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5725
  • Thank you received: 333
  • Karma: 255
If you are able to manipulate the link leading to the survey, you can pas that information into a hidden question by URL (as linked above). If the question is placed at the first page of the survey, you can then use SGQA identifier at following questions/headlines to refer to that string.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: eadamuk

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74560

  • eadamuk
  • eadamuk's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
I'm having trouble getting this working. I've followed the instructions in the wiki but it doesn't seem to be pre-populating the results.

The URL I am calling is:
index.php?sid=84938&lang=en&84938X20X207=BL0001&84938X20X208=Head%20Dean%20(Principal)

My survey ID is 84938, question group 20, questions 207 and 208 which are a short free text type.

I assume I can pass strings to a text box, do I need to implement something else on the page?

Thanks
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74574

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5725
  • Thank you received: 333
  • Karma: 255
Please post a link to the survey so we can check if you use the correct SGQA IDs.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74816

  • eadamuk
  • eadamuk's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Here is the URL link - i just have one page at the moment:
apply.belovedccs.org/index.php?sid=84938...20Dean%20(Principal)

Thanks,
Adam
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74817

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 83
  • Karma: 37
Above and beyond any possible SGQA issues, there was a bug in 1.92 RC4 related to hidden parameters. It has been fixed. Details here: bugs.limesurvey.org/view.php?id=5818
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74818

  • eadamuk
  • eadamuk's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Thanks, I'm currently on Version 1.91+ Build 11379 - so I assume this isn't an issue.
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74844

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5088
  • Thank you received: 1046
  • Karma: 438
eadamuk, your survey is pre-populating correctly for me:

This message has an attachment image.
Please log in or register to see it.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Can I pass a parameter to a survey through a query string? 3 years 6 months ago #74849

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 3690
  • Thank you received: 498
  • Karma: 162
Same here. Just like in Tony's screenshot.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.180 seconds