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:dropvalue [17.11.2019 16:42] moritz.guentheren:create:functions:dropvalue [17.11.2019 16:55] moritz.guenther
Line 3: Line 3:
 ''**dropValue**(String //VariablenKennung//)'' ''**dropValue**(String //VariablenKennung//)''
  
-The function ''dropValue()'' deletes the current value of a variable with the specified //variable identification//.+The function ''dropValue()'' deletes the current value of a variable with the specified //variableID//.
  
-  * //variable identification//\\ The variable identification as specified in the **variables overview**.+  * //variableID//\\ The variable identification as specified in the **variables overview**.
  
 **Caveat:** A value deleted by means of ''dropValue()'' cannot be restored. In the data set the variable apears to be missing as if it had not been levied. **Caveat:** A value deleted by means of ''dropValue()'' cannot be restored. In the data set the variable apears to be missing as if it had not been levied.
Line 12: Line 12:
 ===== Applications ===== ===== Applications =====
  
-The function ''dropValue()'' can be useful in levying the e-mail address of an individual in order to send an e-mail to that address via ''[[:en:create:functions:mailsend]]'' and then delete the e-mail address afterwards. However, if the e-mail is not to include user specific information, the function [[de:create:questions:email]] may be more useful.+The function ''dropValue()'' can be useful in levying the e-mail address of an individual in order to send an e-mail to that address via ''[[:en:create:functions:mailsend]]'' and then delete the e-mail address afterwards. However, if the e-mail is not to include user specific information, the function [[en:create:questions:email]] may be more useful.
  
-Ein anderer Einsatzbereich kann darin bestehen, dass die Teilnehmer eine Antwort (z.Beine Mailadresse oder ein kurzer Aufsatzgeben soll, diese aber aus Datenschutzgründen nicht im Datensatz auftauchen darfEtwa als Priming-Aufgabe oder wenn nur die Länge des Textes interessiertnicht aber der InhaltWenn Sie Informationen über den Text speichernachten Sie aber daraufdass der PHP-Code der Seite ggfmehrfach ausgeführt werden könnte, z.Bwenn der Teilnehmer die Seite erneut lädt. In solchen Fällen hilft die Funktion ''[[:de:create:functions:getroute]]''Natürlich sollte dem Teilnehmer auch kein Zurück-Knopf angeboten werden.+Anotoher application may arise if an interviewee is to provide an answer (e.gan e-mail address or a short essaywhich is not to be saved in the data set due to privacy issuesThis may be needed as a priming task or if the interviewer is only interested in the length of the text enteredbut not its actual contentHoweverif you do save information on the text enteredplease consider that PHP-code may be executed repeatedly - e.gif the interviewee reloads the page. In such cases the function ''[[:de:create:functions:getroute]]'' may be helpfulAlso note, that the interviewee should not be provided a button to go back
  
 <code php> <code php>
 if (getRoute() == 'next') { if (getRoute() == 'next') {
-  // Länge des eingegebenen Textes im Eingabefeld TX01_01 bestimmen (in Zeichen)+  // determines length of the entered text TX01_01 (in characters)
   $length = mb_strlen(value('TX01_01'));   $length = mb_strlen(value('TX01_01'));
-  // Die Länge in der internen Variable IV01_01 speichern+  // saves the length in the internal variable IV01_01 
   put('IV01_01', $length);   put('IV01_01', $length);
-  // Die eigentliche Texteingabe löschen+  // deletes the actual text that was entered 
   dropValue('TX01_01');   dropValue('TX01_01');
 } }
 </code> </code>
en/create/functions/dropvalue.txt · Last modified: 19.05.2021 20:58 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