Welcome, Guest
Username: Password: Remember me

TOPIC: Pre-population of questions.....

Re: Aw: Pre-population of questions..... 2 years 6 months ago #71395

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
rocksalt-

I meant to say that 1.92 will validate whatever data you try to enter. 1.91+ may also do this, but I'm not sure about that detail.

So, using the attached sample survey as an example, if I give the following URLs, I get the described results:
http://localhost/limesurvey_dev/index.php?sid=27246&newtest=Y&lang=en&27246X5X33=Y&27246X5X35=25&27246&27246X7X37=Tom

Yields this:

pre-populate1.jpg


and when you click next twice, you get this:

pre-populate1b.jpg


However, if I use this URL (which does not make QID 35 irrelevant):
http://localhost/limesurvey_dev/index.php?sid=27246&newtest=Y&lang=en&27246X5X33=Y&27246X5X35=25&27246&27246X7X37=Tom

You get this:

pre-populate2.jpg


and then if you select C for Question Q2, you get this, which shows that the passed-in value of 25 for Q3 has been NULLed:

pre-populate2b.jpg


Here is the survey I'm referencing. Pages 1-2 are courtesy of lemeur:

File Attachment:

File Name: limesurvey_survey_27246.lss
File Size: 58 KB


/Tom
The administrator has disabled public write access.

Re: Aw: Pre-population of questions..... 2 years 6 months ago #71396

  • rocksalt
  • rocksalt's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Thanks Tom, that clears that up nicely :)
The administrator has disabled public write access.

Re: Aw: Pre-population of questions..... 2 years 6 months ago #71613

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
If you are looking for a more generic solution I can think of making an Ajax call on every survey page, passinbg a certain user ID to a PHP script. That script then gets the according data from an external DB and passes back an array which is read by some JS to populate the according survey fields (there are variations of that approach).

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.

Re: Aw: Pre-population of questions..... 2 years 6 months ago #71641

  • rocksalt
  • rocksalt's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
i actually solved it with a native parsing of the url.
i found the field names corresponded to the email url i was trying to push... so in the end i didn't have to do anything fancy except change the url to match what we being outputted by our template email to match that which LS was expecting.
The administrator has disabled public write access.

Re: Aw: Pre-population of questions..... 2 years 6 months ago #71714

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
rocksalt, can you post your solution at manual -> workarounds so others will benefit frim it, too?!

Thanks!

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.
Moderators: ITEd
Time to create page: 0.205 seconds
Donation Image