Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Dynamic Variable Passed to End URL

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #226054 by davebostockgmail
Dynamic Variable Passed to End URL was created by davebostockgmail
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.4+220309
Own server or LimeSurvey hosting: Own Server
Survey theme/template: All
==================

We have recently upgraded to version 5 and a previously working survey is now not working as expected.

We have a dynamic end url which sends the respondent to a further survey and uses the token to link the surveys. The End URL is set by a hidden question as there are a few options for redirection.

The answers to a hidden list question are along the lines of https://secondsurveyurl?token={TOKEN:TOKEN}&Q1={S1.NAOK} and https://secondsurveyurl?token={TOKEN:TOKEN}&Q1={S2.NAOK}

This has worked extremely well in the old v3.x versions but now the redirect is showing in the address bar as https://secondsurveyurl?token=&123;TOKEN:TOKEN&125;&Q1=&123;S1.NAOK&125;

As you can see it is putting in the html code for the {}'s and this is causing the URL redirect to fail.

I have tried to alter the answers to account for the html code and this doesn't work either.

Any ideas on why this is happening and what settings I need to change to make it work?

Thanks
Dave
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #226062 by tpartner
Replied by tpartner on topic Dynamic Variable Passed to End URL
I cannot reproduce this. Can you provide a small sample survey (.lss file)?

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #226064 by davebostockgmail
Replied by davebostockgmail on topic Dynamic Variable Passed to End URL
Thanks for the quick response Tony

This is a little more complex than passing from one survey to another .. it involves a PHP file that creates a token entry into the second survey file and a lot of variables that come from the survey.

I have narrowed it down to the string that is being passed to the PHP file not being passed correctly ...

This is what is coming back as the URL

https://surveylocation/newcar.php?t1={Recontact_1}&t2={Recontact_2}&t3={Recontact_3}&t4={TOKEN:TOKEN}&t5={CarInfo_1}&t6={CarInfo_2}&t7={FuelType.NAOK}&t8=2

and this is what is in the question answer that is being set to the answer and then being used as the End URL

https://surveylocation/newcar.php?t1={Recontact_1}&t2={Recontact_2}&t3={Recontact_3}&t4={TOKEN:TOKEN}&t5={CarInfo_1}&t6={CarInfo_2}&t7={FuelType.NAOK}&t8=2

As this is quite complex I will work on getting a modified lss file that reproduces this.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #226066 by Joffm
Replied by Joffm on topic Dynamic Variable Passed to End URL
Did you try to create the end-url in an equation (myUrl) and enter in the end-url field only {myUrl}?

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: davebostockgmail

Please Log in to join the conversation.

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #226067 by davebostockgmail
Replied by davebostockgmail on topic Dynamic Variable Passed to End URL
Hi Jofm

I have not tried doing that yet.

I will give it a go and report back

Please Log in to join the conversation.

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #226110 by davebostockgmail
Replied by davebostockgmail on topic Dynamic Variable Passed to End URL
Using the equation that set the final short text box as the end URL worked.

Thanks
Dave

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose