[[readGET()]]
 

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
Last revisionBoth sides next revision
en:create:functions:readget [11.12.2014 21:33] alexander.ritteren:create:functions:readget [29.09.2020 16:53] – [readGET()] sophia.schauer
Line 8: Line 8:
   * //warning//\\ should a warning be displayed if the command is used on a different page other than the first?   * //warning//\\ should a warning be displayed if the command is used on a different page other than the first?
     * ''true'' -- (standard) display warning (warning is __only__ visible to the project administrator, not the participant)     * ''true'' -- (standard) display warning (warning is __only__ visible to the project administrator, not the participant)
-    * ''false'' -- hide warning: the project administrator knows what he is doing+    * ''false'' -- hide warning: the project administrator knows what he is doing.
  
 The function's return value is the string that was transmitted using POST or GET when the questionnaire is called up. If the variable was not transmitted, ''false'' will be returned. The function's return value is the string that was transmitted using POST or GET when the questionnaire is called up. If the variable was not transmitted, ''false'' will be returned.
Line 14: Line 14:
 ===== Notes ===== ===== Notes =====
  
-  * Reading __only__ works on the first page of the questionnaire, __or__ on a page that was set up using ''[[:en:create:functions-output#option|option('resume', true)]]'' when broken, __or__ if the project administrator ensures the variable was transmitted by using an appropriate link.+  * Reading __only__ works on the first page of the questionnaire, __or__ on a page that was prepared for a break using ''[[:en:create:functions:option|option('resume', true)]]'', __or__ if the project administrator ensures the variable was transmitted by using an appropriate link.
   * Certain variables have a specific meaning and should not be used to transfer user-defined data; see [[:en:survey:url|URL to the Questionnaire]].   * Certain variables have a specific meaning and should not be used to transfer user-defined data; see [[:en:survey:url|URL to the Questionnaire]].
   * Before using ''readGET()'', check whether a value has already been set. In the examples below, ''[[http://php.net/manual/en/function.isset.php|isset()]]'' or ''[[:en:create:functions:getroute|getRoute()]]'' is used to do so. For example, if you put a compulsory question on the first page in the questionnaire, the first page will be shown again if no answer is given, but ''readGET()'' is unable to read the value anymore. This "no value" would then overwrite the correct value already stored.    * Before using ''readGET()'', check whether a value has already been set. In the examples below, ''[[http://php.net/manual/en/function.isset.php|isset()]]'' or ''[[:en:create:functions:getroute|getRoute()]]'' is used to do so. For example, if you put a compulsory question on the first page in the questionnaire, the first page will be shown again if no answer is given, but ''readGET()'' is unable to read the value anymore. This "no value" would then overwrite the correct value already stored. 
Line 29: Line 29:
   $id = readGET('panelID');   $id = readGET('panelID');
   // register variable for later use   // register variable for later use
-  registerVariable('id');+  registerVariable($id);
 } }
 </code> </code>
en/create/functions/readget.txt · Last modified: 29.09.2020 16:53 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