Welcome to the LimeSurvey Community Forum

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

use end url and attributes to redirect - problem when resuming later

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190380 by DenisChenu

asilbering wrote: What I was doing before (and was working fine in LS 2.05) was to direct to an equation question in the end url field ({myURL}) and then having an if clause in myURL.

This is not working in LS 3.19 anymore.

It's my advice : didn't use an eaquation in end url, but create an equation question

Sometimes i have 3 equations question at start of the survey
EndUrl
QuotaOutUrl
OptOutUrl

If it don,'t work on 3.19 : it's really a major issue and must be reported.

So your suggestion would be that :
1- I write an if clause in the end url field ({if(Q1 lt 1," example.com ")})
2 - and then the condition related to the attribute in the equation question Q1 ({TOKEN:ATTRIBUTE_2=="NA"})

No …

EndUrl equation hidden question

Code:
{ if({TOKEN:ATTRIBUTE_2}!="NA","example.org/survey/212/token/"+{TOKEN}+"/val/"{TOKEN:ATTRIBUTE_2},""}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190389 by holch

If it don,'t work on 3.19 : it's really a major issue and must be reported.

I was playing around quick with the end url field and equations and I wasn't able to make it work (within the end url field). Limesurvey did always subsitute parts of the equation (within the end url field directly) with some html code. This happened both, in the demo version and in my own installation.

So it seems like equations in the end URL feature don't really work (or I have some kind of wrong setting, but XSS filter was switched off).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • asilbering
  • asilbering's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 5 months ago #190390 by asilbering
Thanks Denis and Holch,

I have tried a bit with both approaches (equation in the endurl field and endurl field directing to an equation question with the if clause) and was not able to make it work. I will send a sample survey tomorrow (no time to prepare it today), maybe someone can spot an error... Otherwise I will file a report.

Best regards,
Ana
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago - 4 years 5 months ago #190392 by DenisChenu

holch wrote:

If it don,'t work on 3.19 : it's really a major issue and must be reported.

I was playing around quick with the end url field and equations and I wasn't able to make it work (within the end url field).

I say : use an equation … it work with an equation without any issue since 1.92 and still work on 3.19

And it work : sample in demo

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 5 months ago by DenisChenu.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190396 by holch
I understood that it works with an equation question. But, what if I want to use an equation directly in the End URL field? Shouldn't this work as well?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190407 by DenisChenu
It can but more hard :
1. Don't use double quote : only single quote
2. Don't use < or & etc : replace by lt or and
3. One line

Here for same value than Equation
Code:
{join(if(!is_empty(Choose.NAOK),'https://'+Choose.shown+'/',''),if(!is_empty(Choose.NAOK) and !is_empty(Param.NAOK),'?param='+Param.NAOK+'/',''))}


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • asilbering
  • asilbering's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 5 months ago #190508 by asilbering
Hi all,

thanks again for your help.

I managed to get it to work with the equation question. I think the problem was coming from some double quotes.

Best regards,
Ana
The topic has been locked.
  • asilbering
  • asilbering's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 4 months ago - 4 years 4 months ago #191748 by asilbering
Hi all,

I need users to complete the same survey several times for different lessons. To make things simpler for them, I send a single link in the invitation email and I use end url and token attributes to redirect the users to a new survey. See attached survey.
In my participant table each participant is listed as many times as they have lessons and each entry contains the title of the lessons in a token attribute and a second attribute called "nextToken" contains the token to the following survey or NA (in case the user has reached the survey for the last lesson).
So I first generate and export dummy tokens and then add the participant and lesson details to each entry (in excel).
The problem is that if a user submits the first survey and the second survey is loaded, if they decide to save and resume later, they can no longer access the survey (because the link they have contains the token of the first survey, which does not match the token stored in the cookie).

Do you have any suggestions to solve this problem? I would urgently need a workaround because I have a survey running, and I had not though about this during development and I am afraid people will start to run into this problem, which would be very annoying..

Thanks in advance!
Ana

I am using LS 3.19
Last edit: 4 years 4 months ago by asilbering.
The topic has been locked.
  • asilbering
  • asilbering's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 4 months ago #191765 by asilbering
I have found this link:
manual.limesurvey.org/SaveResume
so I guess there should be a workaround, but I don't know how to implement it.
If I understood correctly there is an option to send an email with the link when the user saves, but I could not find the place to activate this functionality.
Any hints are more than welcome!!
Thanks again in advance for your help!
Best,
Ana
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #191766 by tpartner
Survey settings --> Notifications & data --> Participant may save and resume later

- manual.limesurvey.org/Notifications_%26_...ave_and_resume_later

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • asilbering
  • asilbering's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 4 months ago - 4 years 4 months ago #191780 by asilbering
Thanks tpartner, that setting was enabled already, but the user did not receive a new email with the link of the survey that had been saved when they saved to resume later.
After playing around a bit I found out that disabling the token persistence with the save/resume setting ON might be a solution for my problem.
In this configuration the user is asked to create a username and password to resume later, and an email is sent if they enter the email address.
This solution is ok but not optimal.
Since the survey is not public, there is no reason to ask for the details again when saving. Would it be possible to pre-fill the "save form" with the information in the participant list (using the token as password, for example)?

Or even better, would it be possible to send the email automatically without having to fill out this form?

Thanks in advance,

Ana
Last edit: 4 years 4 months ago by asilbering.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #191784 by tpartner
Not as far as I know.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose