- Posts: 13648
- Thank you received: 2491
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
- Offline
- LimeSurvey Community Team
Less
More
4 years 5 months ago #190380
by DenisChenu
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.
EndUrl equation hidden question
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.
Replied by DenisChenu on topic use end url and attributes to redirect users to fill survey more than once?
It's my advice : didn't use an eaquation in end url, but create an equation questionasilbering 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.
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.
No …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"})
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
4 years 5 months ago #190389
by holch
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.
Replied by holch on topic use end url and attributes to redirect users to fill survey more than once?
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.If it don,'t work on 3.19 : it's really a major issue and must be reported.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 5 months ago #190390
by asilbering
Replied by asilbering on topic use end url and attributes to redirect users to fill survey more than once?
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
4 years 5 months ago - 4 years 5 months ago #190392
by DenisChenu
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.
Replied by DenisChenu on topic use end url and attributes to redirect users to fill survey more than once?
I say : use an equation … it work with an equation without any issue since 1.92 and still work on 3.19holch wrote:
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).If it don,'t work on 3.19 : it's really a major issue and must be reported.
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.
Attachments:
Last edit: 4 years 5 months ago by DenisChenu.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
4 years 5 months ago #190396
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic use end url and attributes to redirect users to fill survey more than once?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
4 years 5 months ago #190407
by DenisChenu
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.
Replied by DenisChenu on topic use end url and attributes to redirect users to fill survey more than once?
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
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.
Attachments:
The topic has been locked.
- asilbering
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 5 months ago #190508
by asilbering
Replied by asilbering on topic use end url and attributes to redirect users to fill survey more than once?
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
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 4 months ago - 4 years 4 months ago #191748
by asilbering
Replied by asilbering on topic use end url and attributes to redirect - problem when resuming later
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
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 4 months ago #191765
by asilbering
Replied by asilbering on topic use end url and attributes to redirect - problem when resuming later
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 years 4 months ago #191766
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic use end url and attributes to redirect - problem when resuming later
Survey settings --> Notifications & data --> Participant may save and resume later
- manual.limesurvey.org/Notifications_%26_...ave_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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 4 months ago - 4 years 4 months ago #191780
by asilbering
Replied by asilbering on topic use end url and attributes to redirect - problem when resuming later
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 years 4 months ago #191784
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic use end url and attributes to redirect - problem when resuming later
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.