Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Prefilling answer and passing through in end URL

Prefilling answer and passing through in end URL 4 years 5 months ago #77819

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
Help! Can somebody explain why this isn't working?

I have a "introduction" survey followed by a variety of follow-up surveys. Depending on the situation I want to call different follow up surveys.

So my plan was to prefill the second survey id in a hidden question in the first survey, then pass it into the end url.

I start the first survey with this url:
index.php?sid=19839&19839X29X575=61625

The end URL is set to this:
index.php?sid={INSERTANS:19839X29X575}

Neither step seems to be working. The prefilled parameter isn't going in from the starting URL, and if I do insert it manually it doesn't pass it through, the survey id in the end URL just comes through blank.


Any ideas? :(
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77824

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
Hello,

What is your version of LS ?
Maybe this functionnality aren't tested in 192.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77827

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
This definitely works in 1.92+. It was fixed in time for the 1.92 RC5 release (see this bug report)
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77835

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
TMSWhite wrote:
This definitely works in 1.92+. It was fixed in time for the 1.92 RC5 release (see this bug report)
Thanks for the link Tom !

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77866

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
Ok, thanks for the link Tom. I am planning to have the question hidden, but tried it both ways anyway.

I did test this in 1.91 anyway and it worked correctly. The prefill worked on a hidden and a non-hidden question. And the end URL had the right value.

Then I went back to 1.92 and now I can get the question to prefill, but it's not passing the value through to the end URL. It just shows "sid= "

Has this changed in 1.92? Notice I'm using the SGQA id. Not sure if Expression Manager has any bearing on this
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77930

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6009
  • Thank you received: 370
  • Karma: 260
You can test if this is fixed at the latest version by testing our online Demo which always runs the latest Limesurvey version.
Username: admin
Password: test
If you can reproduce the problem there please report back.

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.

Prefilling answer and passing through in end URL 4 years 5 months ago #77985

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
I set up 2 test surveys on the Demo site and was able to reproduce the problem. I left the prefill question non-hidden so you can see the prefill is working. But the survey id is not coming out in the end URL. I did add the language parameter this time just to see if it made a difference, but it didn't Try it out.

ABC Survey 1: sid = 66892
ABC Survey 2: sid = 64971

Link to start ABC Survey 1:
Demo.limesurvey.org/index.php?sid=66892&...66892X230X1453=64971

END URL (should go to ABC Survey 2):
Demo.limesurvey.org/index.php?sid={INSER...92X230X1453}&lang=en
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77987

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
Fred-

You were right - it was a bug. It has been fixed on GitHub.
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 4 years 5 months ago #77995

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6009
  • Thank you received: 370
  • Karma: 260
And the price for fastest bug fixing goes toooooo...

Tom!

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.

Prefilling answer and passing through in end URL 4 years 5 months ago #78025

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
Yes, thanks so much Tom.

I really assumed I was doing something wrong!
The administrator has disabled public write access.

Prefilling answer and passing through in end URL 3 years 4 months ago #95581

  • ohvelma
  • ohvelma's Avatar
  • Offline
  • Senior Lime
  • Posts: 62
  • Thank you received: 5
  • Karma: 4
I am having a similar problem. I have a Parent Survey (sid: 691757) that contains a link (FHLINK) to a Child Survey (sid:579758). I want the user to select the link, fill in information about their female relative with cancer in the Child Survey, and have the Child Survey’s End-URL redirect back to this question on the Parent Survey returning the relative type which I want to use to populate a Long free text value on the Parent Survey.

Everything is working except the revision of the long free text when returning from the child survey. The returned End-URL from the Child Survey is: "nmtstudy.limequery.com/index.php/survey/.../RelativeList/Mother"

SO how do I get "Mother" out of the URL and append it into the Long free text (RelativeList) question on the Parent Survey?
Attachments:
Last Edit: 3 years 4 months ago by ohvelma.
The administrator has disabled public write access.
Time to create page: 0.366 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form