voiddropValue(String variableID)
The function dropValue()
deletes the current value of a variable with the specified variableID.
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.
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 mailSend()
and then delete the e-mail address afterwards. However, if the e-mail is not to include user specific information, the function Send Email to a Personal Contact may be more useful.
Anotoher application may arise if an interviewee is to provide an answer (e.g. an e-mail address or a short essay) which is not to be saved in the data set due to privacy issues. This may be needed as a priming task or if the interviewer is only interested in the length of the text entered, but not its actual content. However, if you do save information on the text entered, please consider that PHP-code may be executed repeatedly - e.g. if the interviewee reloads the page. In such cases the function getRoute()
may be helpful. Also note, that the interviewee should not be provided a button to go back.
if (getRoute() == 'next') { // determines length of the entered text TX01_01 (in characters) $length = mb_strlen(value('TX01_01')); // saves the length in the internal variable IV01_01 put('IV01_01', $length); // deletes the actual text that was entered dropValue('TX01_01'); }