====== Texts in the Questionnaire ====== Besides questions, texts are the most important component of questionnaires. You need them for the welcome, for longer explanations, and often as stimuli (e.g., articles). Texts are created in a section, similar to questions. Select the desired section and click //Add Text// on the left in the **List of Questions**. Enter a //Description// for the text, which only you as the project manager will see. Then you can choose between different display variants for the text. * The default is a "Simple text". Its formatting fits seamlessly into the questionnaire, and it allows simple formatting by means of the [[texts-wiki|wiki notation]]. * The display "Formatted text" allows formatting with an editor. **Important:** However, please do not copy texts directly from Microsoft Word into a formatted text. This copies a lot of unnecessary formatting, which may later lead to display errors. * For more sophisticated designs, you can enter HTML or JavaScript directly with the display "HTML code". This way, you can also embed videos, for example ([[:en:create:media]]). * Extensive information can be presented clearly as a text accordion ([[:en:create:accordion]]) If desired, you can also enter text content in the tab //Title//, which will be formatted like a question. As soon as you save the text ({{:button.save.png?nolink|Save button}}), it appears in the list of questions. ===== Use in the Questionnaire ===== There are 4 different ways to include texts in the questionnaire. On the one hand, you can enter HTML code directly in the questionnaire, on the other hand, you can use text elements (see above). Entering HTML code directly makes **Compose Questionnaire** rather confusing, therefore we recommend creating texts in the list of questions. Besides different formatting options, these also support [[:en:create:multilang|multilingual questionnaires]]. * //Texts//\\ Texts from the list of questions are included in the questionnaire under **Compose Questionnaire** just like questions: * Drag the text into the questionnaire via [[:en:glossary#drag_drop|drag & drop]]. * Include the text with the PHP function ''[[:en:create:functions:text|text()]]'' or ''[[:en:create:functions:show|show()]]''. * //HTML code directly in the questionnaire//\\ Only use HTML code in the questionnaire if you either need very short snippets of HTML code (e.g., to position questionnaire elements) or if you have to insert dynamically generated content directly (not by means of placeholders). * Drag an element of the type //HTML code// into the questionnaire and type the HTML code directly there. * Include HTML code in the questionnaire with the PHP function ''[[:en:create:functions:html|html()]]''. As you can see in the following example, the HTML code can be spread over several lines for the sake of clarity: html('

Registration for the Seminar
Instruments for the Online Survey

');
===== Formatting Texts ===== When you create a text in the list of questions, you can format it directly via the editor. In the background, the formatting is translated into HTML code. But questions, explanations, items, and other labels can be formatted as well. For this, you have two options: a wiki notation for simple formatting (especially within questions) and HTML for more sophisticated formats (e.g., in the welcome text). HTML and wiki notation can be mixed as desired. * [[texts-wiki|Formatting Texts with Wiki Notation]] * [[texts-html|Formatting Text with HTML]]