Welcome, Guest
Username: Password: Remember me

TOPIC: $_GET['id']

$_GET['id'] 2 years 10 months ago #71028

hello i have a problem:

i would like to create a survey but, it should be able to receive a id from for example facebook, because i will add a link in facebook to the survey and it should be able to get an id like fbid=1234 into the survey.

is that possible?

cheers
The administrator has disabled public write access.

Aw: $_GET['id'] 2 years 10 months ago #71057

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

I think you can use a little Javascript method in the template.js file of a design template you use or in your survey. If you want to do it in your survey and not in the design template's .js file you have to check the option "Global settings" -> "Security" -> "Filter HTML for XSS:". If set to "Yes" you can't use Javascript in your survey so you have to set it to "No".

To get the url you can use e.g.
document.url
and look for the parameter you want.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.097 seconds
Donation Image