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
Next revisionBoth sides next revision
en:create:functions:getitems [28.11.2014 12:45] – [getItems()] alexander.ritteren:create:functions:getitems [28.11.2014 12:48] – [Use Selected Items in Another Question] alexander.ritter
Line 22: Line 22:
 |'''invalid'''|items left empty or given an answer of "do not know".| |'''invalid'''|items left empty or given an answer of "do not know".|
  
-**Note:** As is the case with ''value()'', this function can only determine the answers of a participant on the page after the question. If the function is on the same page as the question, it does not work correctly because the answers will not have been transmitted to the server at all when the "continue" button is pressed.+**Note:** As is the case with ''value()'', this function can only determine the answers of a participant on the page after the question. If the function is on the same page as the question, it does not work correctly because the answers will not yet have been transmitted to the server when the "next" button is pressed.
  
 ===== Use Selected Items in Another Question ===== ===== Use Selected Items in Another Question =====
Line 28: Line 28:
 In the following example, question ''AB01'' (a matrix question -- scale) is asked on page 1, in which the participant has to specify how often they read different magazines.  In the following example, question ''AB01'' (a matrix question -- scale) is asked on page 1, in which the participant has to specify how often they read different magazines. 
  
-On the following page 2, only items used no less frequently than "rarely" (answer code 2) should be displayed.+On the following page 2, only items used at least "rarely" (answer code 2) should be displayed.
  
 This example assumes that ''AB02'' has just as many items as ''AB01''. In addition, matching items must also have the same ID. Thus, item 1 could be "mirror" in both questions, and item 2 could be "star". This example assumes that ''AB02'' has just as many items as ''AB01''. In addition, matching items must also have the same ID. Thus, item 1 could be "mirror" in both questions, and item 2 could be "star".
Line 36: Line 36:
 <code php> <code php>
 // page 2 // page 2
-// determine items used no less frequently than "rarely" (2)+// determine items used at least "rarely" (2)
 $itemlist = getItems('AB01', 'min', 2); $itemlist = getItems('AB01', 'min', 2);
 // only show these items in AB02 // only show these items in AB02
en/create/functions/getitems.txt · Last modified: 01.06.2022 19:47 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