dropHistory()

void dropHistory()

During an interview, the sequence of pages is stored in the background, along with additional information that allows navigating back through the questionnaire.

For very long questionnaires and when using setPageOrder() and loopToPage() the maximum memory capacity can be exceeded in some cases. This is noticeable by an error message with termination of the interview.

By means of dropHistory() the background memory for the history can be emptied. Afterwards, the back button, if present, can no longer be used to visit pages that precede the page with dropHistory().

The function dropHistory() can also be used to deliberately prevent the back function from a certain point in the questionnaire. Nevertheless, the use of option('backbutton', false) is usually much better for this.