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:gotopage [12.12.2014 17:33] – [End Questionnaire] alexander.ritteren:create:functions:gotopage [27.06.2017 08:45] (current) – [Example] admin
Line 11: Line 11:
 {{:de:create:functions:scr.gotopage.pageid.png?nolink|Entering a Page ID}} {{:de:create:functions:scr.gotopage.pageid.png?nolink|Entering a Page ID}}
  
-  * The command ''goToPage('end')'' ends the survey immediately and shows the last page ([[#end_interview|End Questionnaire]]).+  * The command ''goToPage('end')'' ends the survey immediately and shows the last page ([[#end_questionnaire|End Questionnaire]]).
   * The command ''goToPage('next')'' always jumps to the next page in the questionnaire.   * The command ''goToPage('next')'' always jumps to the next page in the questionnaire.
  
Line 18: Line 18:
 ===== Example ===== ===== Example =====
  
-See also [[:en:create:filters|Filters and Conditional Questions]]+See also [[:en:create:filters]]
  
 The following example assumes that a multiple-choice selection ''AB02'' with 8 items was offered on page 1 of the questionnaire. If the participant selected option no. 7  (''AB02_07''), page 2 of the questionnaire should be skipped by using ''goToPage()''. Page 3 in the questionnaire -- the jump destination -- has the page ID "pa" The following example assumes that a multiple-choice selection ''AB02'' with 8 items was offered on page 1 of the questionnaire. If the participant selected option no. 7  (''AB02_07''), page 2 of the questionnaire should be skipped by using ''goToPage()''. Page 3 in the questionnaire -- the jump destination -- has the page ID "pa"
Line 33: Line 33:
 **Tip:** If you want to display a page again because the data given by the participant was incomplete, use the function ''[[:en:create:functions:repeatpage|repeatPage()]]'' instead of '''goToPage()'', . This means the Back button remains fully functional.  **Tip:** If you want to display a page again because the data given by the participant was incomplete, use the function ''[[:en:create:functions:repeatpage|repeatPage()]]'' instead of '''goToPage()'', . This means the Back button remains fully functional. 
  
-**Tip:** Please also be aware of the function ''[[:en:create:functions-proc#setnextpage|setNextPage()]]''. This function does not jump directly to the specified page, but only after the participant has clicked on "Next"+**Tip:** Please also be aware of the function ''[[:en:create:functions:setnextpage|setNextPage()]]''. This function does not jump directly to the specified page, but only after the participant has clicked on "Next"
  
  
Line 43: Line 43:
 <code php> <code php>
 // If "I would like to participate in the study" was not checked // If "I would like to participate in the study" was not checked
-// (AB01_01) was set, the questionnaire jumps directly to the end to wish the participant farewell+// (AB01_01) was set, the questionnaire jumps directly to the end and displays a message stating that the questionnaire is complete
 if (value('AB01_01') == 1) { if (value('AB01_01') == 1) {
   goToPage('end');   goToPage('end');
en/create/functions/gotopage.txt · Last modified: 27.06.2017 08:45 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki