====== The Last Page ====== Whenever a participant clicks on the "Next" button in the questionnaire, the answers are transferred from the browser to the server, processed there, and the server sends the next questionnaire page to the browser. But at any point the questionnaire is over and there is no next page. After the last click the "last page" is displayed. ===== Content of the Last Page ===== The content of the last page can be changed under **Compose questionnaire**, there select "last page" in the list of pages. The content is entered directly as [[:en:create:texts#formatting_with_html|HTML code]]. On www.soscisurvey.de, the last page may show an advertisement (in methods exercises, i.e., projects from the academic context whose results are not published) or an invitation for the SoSci Panel (in scientific research projects). The [[https://www.soscipanel.de/|SoSci Panel]] is a non-commercial institution for the promotion of online scientific research -- in this respect, we recommend leaving the invitation active. You can also deactivate the cross for the invitation on the last page. ===== Questions on the Last Page ===== Since the last page does not have a "Next" button to send replies, no replies can be sent to the server on this page either. After all, there would be no other page that could be displayed afterwards. However, sometimes you may want to display a comment field on the last page, which participants can fill in or not. Or you want to query another e-mail address with a question of the type [[:en:create:questions:contact]]. This is possible with the following trick: You show an additional page (quasi-last page) with goodbye, question and continue button -- and only after that the "real" last page follows. There is one small limitation: In the case of interviews where the "wrong" last page is no longer sent (which is the intention), the FINISHED variable is not set to the value 1. However, this does not pose any problems, because the valid cases can be defined under **Collected data** -> **Selection criteria for valid cases** also on the basis of the last page reached (LASTPAGE). The procedure is as follows: - Copy the HTML content of the last page, create a text module in a section of your choice with "New text", set the option "HTML code" for the //display// and paste the HTML code from the last page there. - Under **Compose Questionnaire**, add an additional regular page before the last page. On this page you place the text you just created and the question you want to display on the quasi-last page. ===== Botton "Send" on the Next to Last Page ===== Normally, the same" Next" button appears on the penultimate page as on all previous pages. If you allow a "Back" button and want to make it clear to respondents that the interview is finished after this page, you can use ''[[:en:create:functions:option]]'' to give the button a different label. option('nextbutton', 'send'); ===== Back Button on the Last Page ===== Do you offer your respondents a back button and want it to be available on the last page? This is also possible with a quasi-last page -- that is, with an additional regular page in the questionnaire inserted just before the last page. On this quasi-last page, hide the "Next" button using ''[[:en:create:functions:option]]'' so that participants can't get to the last page at all. option('nextbutton', false); ===== PHP Code on the Last Page ===== Sometimes you still need to execute PHP code after submitting the last answer with the "Next" button. For example, if you want to send an evaluation of the collected data to the client by email using ''[[:en:create:functions:mailsend]]''. This is possible as well with a quasi-last page (an additional regular page before the last page). Just paste the desired PHP code there -- if the page does not show any content, the questionnaire will automatically proceed to the next page after executing the PHP code.