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:setnextpage [24.01.2015 13:38] – [Example] alexander.ritteren:create:functions:setnextpage [13.07.2021 16:14] (current) – [Tips] sophia.schauer
Line 17: Line 17:
 This function is particularly useful if a filter does __not__ take effect immediately after the filter question. The filter (that cannot be on the same page as the filter question) can then be put on an interim page. An advantage of doing this is that the processing time of the following page is stored in the ''TIMEnnn'' variable ([[:en:results:variables|Additional Variables in the Data Set]])  for the respective page -- this is not guaranteed with ''[[:en:create:functions:gotopage|goToPage()]]''. This function is particularly useful if a filter does __not__ take effect immediately after the filter question. The filter (that cannot be on the same page as the filter question) can then be put on an interim page. An advantage of doing this is that the processing time of the following page is stored in the ''TIMEnnn'' variable ([[:en:results:variables|Additional Variables in the Data Set]])  for the respective page -- this is not guaranteed with ''[[:en:create:functions:gotopage|goToPage()]]''.
  
-**Note:** Do __not__ use ''setNextPage()'' to display the current page repeatedly in a loop. This only creates problems with a potentially available "Back" button. The function ''[[:en:create:functions:looppage|loopPage()]]'' exists for this purpose.+**Note:** Instead of ''setNextPage()'' to display the current page repeatedly in a loop it is better to use the function ''[[:en:create:functions:looppage|loopPage()]]''.
  
 **Note:** Do __not__ use ''setNextPage()'' to redisplay a page due to the participant providing incorrect information ([[:en:create:checks#customized_response_check|Check Responses: Customized Response Check]]). Use the function ''[[:en:create:functions:repeatpage|repeatPage()]]'' instead.  **Note:** Do __not__ use ''setNextPage()'' to redisplay a page due to the participant providing incorrect information ([[:en:create:checks#customized_response_check|Check Responses: Customized Response Check]]). Use the function ''[[:en:create:functions:repeatpage|repeatPage()]]'' instead. 
Line 29: Line 29:
 ===== Example ===== ===== Example =====
  
-The following example assumes that the filter question "AB01" was asked on page 2 of the questionnaire. The following PHP code on page 4 ensures that participants who selected the first response option skip pages 5 to 7, and continue the questionnaire only from page 8 (ID "tv_use") onwards.+The following example assumes that the filter question "AB01" was asked on page 2 of the questionnaire. The following PHP code on page 4 ensures that participants who selected the first response option skip pages 5 to 7, and continue the questionnaire from page 8 (ID "tv_use") onwards.
  
 <code php> <code php>
en/create/functions/setnextpage.txt · Last modified: 13.07.2021 16:14 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki