Welcome to the LimeSurvey Community Forum

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

Redirects using OTX IDs

  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #135840 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
As in the code I quoted above, I used "$('#questionID').hide();" and changed the question code to ID.

The McGill version says Version "1.92+ Build 120919".
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #135847 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I mean that the question code is literally "ID". Sorry if that was confusing.

Under Presentation & Navigation the template is given as "DefaultMcGill". Not sure if that's what you're looking for.
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #135852 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I've replaced "ID" with the number from the Question (ID:419346) area above the buttons. Now it appears to be hidden properly. The new code looks like:

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

// Hide the question
$('#question419346').hide();

// Get the URL param
var otx_id = getURLParameter('otx_id');

// Load the hidden question
$('#question419346 input.text').val(otx_id);
});

</script>


It's hidden from the first page now, but it still doesn't appear to be collecting any responses when I look at the data.

Based on the passthrough example given in the limesurvey manual for 1.92 and older, I am having the survey company use the incoming URL surveys.mcgill.ca/limesurvey/index.php?s...id&otx_id;=xxxxxxxxx , where xxxxxxxxx is the nine digit Member ID we're trying to capture and the end url is set to www.opinionshere.com/surveycompletion.as...ULABEL=PASSTHRUVALUE .
Last edit: 9 years 1 month ago by CGPsurvey2016.
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #135855 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
OK, after a bit of research I think I may have solved the problem.

I gave the survey company the code: surveys.mcgill.ca/limesurvey/index.php?s...=xxxxxxxxx&newtest=Y

and set the outgoing URL to www.opinionshere.com/surveycompletion.as...S:47539X10468X419346 }

I took all the URL-related code out of the hidden question and left just the line hiding it.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #135972 by holch
Replied by holch on topic Redirects using OTX IDs
Hmmm, I don't know how the questions are referenced in 1.92, and I guess most people here won't have a 1.92 version installed to be able to help yu in detail. And I am also no Javascript expert. Sorry.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 1 month ago #135976 by Ben_V
Replied by Ben_V on topic Redirects using OTX IDs
I would:
1) Create a hidden equation type question with qcode "OTXID"
2) Prefiill this question with the provide id (contained in the url). If using tokens it's easier to use a custom token attribute
3) Pass the value in the end url/redirection using {OTXID} :
.../surveycompletion.as...&otxid={OTXID}

Note that 1.92 version is the 1st LS released with Expression Manager (EM) engine...so you can minimize the use of exact IDs for surveys, groups or questions

For example you can hide a question, pasting in the help area of this question:
Code:
<script type="text/javascript">
  $(document).ready(function(){
    $('#question{QID}').hide();
  });
</script>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
More
9 years 1 month ago #136020 by jelo
Replied by jelo on topic Redirects using OTX IDs

CGPsurvey2016 wrote: OK, after a bit of research I think I may have solved the problem.
I took all the URL-related code out of the hidden question and left just the line hiding it.

Yepp, correct way to do it. In the old day this was the way to go.
Wasn't hiding questions via advanced settings already available? I never used any javascript code to do panel integration.
The panel staff was often confused by the crazy GET parameters (12345&47539X10468X419346=) Limesurvey needed .

When using panels I never allow to hit the exit and clear button. Limesurvey allow no easy way to redirect to a correct panel URL.
After hitting that exit button the panel link has to be clicked by the proband which isn't bulletproof. Since
the "Answers cleared" screen also provides links for "Restart this survey" and "Close this window"

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose