Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
en:create:functions:answersprint [16.04.2015 17:20] – [Example 2] alexander.ritter | en:create:functions:answersprint [09.03.2022 10:28] (current) – [Example 1] ruth.noppeney |
---|
| |
The ''answersPrint()'' function calls up ''answers'' repeatedly. Therefore, information for ''[[:en:create:functions:answers|answers()]]'' also applies fully for ''answersPrint()''. | The ''answersPrint()'' function calls up ''answers'' repeatedly. Therefore, information for ''[[:en:create:functions:answers|answers()]]'' also applies fully for ''answersPrint()''. |
| |
| If you enable the back button in the questionnaire and use filter questions, the following situation may occur: The respondents is shown a filtered question, then uses the back button, changes an earlier answers, and due to the filter, the other question is not displayed in the subsequent questionnaire, anymore. Nonetheless, ''answersPrint()'' will display the question in the print view, because it has been asked. |
| |
===== Example 1 ===== | ===== Example 1 ===== |
<code php> | <code php> |
answersPrint('all'); | answersPrint('all'); |
text('printButton'); | |
</code> | </code> |
| |
The "printButton" text element has the following content. | Add the following HTML-code below -- either as text (//presentation// "HTML-Code") from the list of questions or as //HTML-element// -- in order to display a "print" button that will call up the function "file" -> "print" of the browser. |
| |
| |
===== Example 2 ===== | ===== Example 2 ===== |
| |
The questionnaire consists if two parts: after a couple of questions regarding the master data (pages 1 and 2), there is a section concerning the respondent's company (pages 3 to 5), and then a section regarding their employment situation. The respondent should get both parts separately in print view, page 6 should not appear in print view. | The questionnaire consists of two parts: after a couple of questions regarding the master data (pages 1 and 2), there is a section concerning the respondent's company (pages 3 to 5), and then a section regarding their employment situation. The respondent should get both parts separately in print view, page 6 should not appear in print view. |
| |
At the top of page 3 a //PHP code// element with the following content is inserted in order to do this: | At the top of page 3 a //PHP code// element with the following content is inserted in order to do this: |