Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:create:functions:casetoken [24.01.2015 12:19] – [Example] alexander.ritteren:create:functions:casetoken [30.03.2026 14:45] (current) admin
Line 3: Line 3:
 ''string **caseToken**()'' ''string **caseToken**()''
  
-Each questionnaire has an internal ID (token), which enables it to be identified during the course of the survey. The ID also appears after "Next" has been clicked on for the first time in the browser's address bar (e.g.  %%https://www.soscisurvey.de/demo/?t=%%__12345abcde__).+Each questionnaire has an internal ID (token), which enables it to be identified during the course of the survey. The ID also appears after "Next" has been clicked on for the first time in the browser's address bar (e.g.  ''%%https://www.soscisurvey.de/demo/?i=%%__12345abcde__'').
  
-Using this ID, it is possible to leave the current questionnaire to do something else (e.g. surf another website, and then subsequently comes back and resume the questionnaire. The prerequisite is that the external website saves the internal ID, and submits ''t'' as the GET variable in the URL back to the questionnaire ([[:en:survey:url|URL to the questionnaire]]).+Using this ID, it is possible to leave the current questionnaire to do something else (e.g. surf another website, and then subsequently comes back and resume the questionnaire. The prerequisite is that the external website saves the internal ID, and submits ''i'' as the GET variable in the URL back to the questionnaire ([[:en:survey:url|URL to the questionnaire]]).
  
 **Note:** The external website has to actively accept the token, save it, and add to it to the URL back to the questionnaire. As a rule, this is only possible if the external website uses a server-side scripting language (e.g. PHP or AS). Saving and returning the ID has to then be separately implemented on the external website. **Note:** The external website has to actively accept the token, save it, and add to it to the URL back to the questionnaire. As a rule, this is only possible if the external website uses a server-side scripting language (e.g. PHP or AS). Saving and returning the ID has to then be separately implemented on the external website.
Line 16: Line 16:
 ===== Example ===== ===== Example =====
  
-In the following example, the questionnaire ID (token) and case number are submitted to an external website ''%%www.s2survey.net%%'', which the participant will be sent to by using ''[[:en:create:functions:redirect|redirect()]]''+In the following example, the questionnaire ID (token) and case number are submitted to an external website ''%%www.example.com%%'', which the participant will be sent to by using ''[[:en:create:functions:redirect|redirect()]]''
  
  
 <code php> <code php>
-redirect('https://www.s2survey.net/?tk='.caseToken().'&num='.caseNumber(), true);+redirect('https://www.example.com/?tk='.caseToken().'&num='.caseNumber(), true);
 </code> </code>
  
Line 26: Line 26:
  
 <code php> <code php>
-redirect('https://www.s2survey.net/?tk=%caseToken%&num=%caseNumber%', true);+redirect('https://www.example.com/?tk=%caseToken%&num=%caseNumber%', true);
 </code> </code>
en/create/functions/casetoken.1422098362.txt.gz · Last modified: by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki