Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:texts [28.11.2014 11:39] – admin | en:create:texts [23.04.2021 17:58] – [Text elements] sophia.schauer |
---|
====== Text elements ====== | ====== Text elements ====== |
| |
To enter texts independently from a certain question, the most convenient way is this: | Texts are -- besides questions -- the most important component of questionnaires. You need them for greetings, longer explanations and often as stimuli (e.g. articles). Texts are created likely questions in a section. Select the desired section and click //Add text// in the **Questionnaire** on the left. |
| |
| Enter a //description// for the text that only you as the project manager will see. Then you can select different display variants for the text. |
| |
| * Standard is a "simple text". This fits seamlessly into the questionnaire from the formatting and allows simple formatting via [[#wiki-notation|wiki notation]]. |
| * The "Formatted Text" display allows formatting with an editor. **Important:** Please do __not__ copy text directly from Microsoft Word into a formatted text. This will copy a lot of unnecessary formatting, which can lead to display errors later. |
| * For more sophisticated design, you can directly enter HTML or JavaScript using the "HTML Code" display. For example, you can also include videos ([[:en:create:media]]). |
| |
| If desired, you can also enter text content in the //Title// tab that will be formatted like a question. As soon as you save the text ({{:button.save.png?nolink|Save button}}), it will appear in the question catalog. |
| |
- Go to **Text elements and labels** at the sidebar under **Questionnaire** | |
- Click on //New text element// | |
- Enter a short //ID// for internal use (e.g. "welcome") | |
- Enter the //text//. You can format it using HTML (see below) | |
- Save the text block by clicking on //OK// | |
- To insert it into the questionnaire, go to **Compose questionnaire**. The newly created text element is now visible on the right under //Texts, images, audio//. You can drag-and-drop the text element into the questionnaire page. You can position it above, between or beneath questions or alone on an own page. | |
| |
===== Other possibilities ===== | ===== Other possibilities ===== |
| |
* //Text elements//\\ Try to always use text elements for texts. The questionnaire will stay clean and slim, and you are able to use functions like multilingual surveys. | * //Text elements//\\ Try to always use text elements for texts. The questionnaire will stay clean and slim, and you are able to use functions like multilingual surveys. |
* [[:en:glossary#drag_drop|Dragging and dropping]] text elements into the questionnaire- | * [[:en:glossary#drag_drop|Dragging and dropping]] text elements into the questionnaire. |
* Implementing text elements using the php function ''[[functions-base#text|text()]]''. | * Implementing text elements using the php function ''[[:en:create:functions:text|text()]]''. |
* //HTML-Code directly in the questionnaire//\\ Use HTML-code only to insert short snippets of code (e.g. when placing questionnaire elements) or if you have to insert dynamically created content without using placeholders. | * //HTML-Code directly in the questionnaire//\\ Use HTML-code only to insert short snippets of code (e.g. when placing questionnaire elements) or if you have to insert dynamically created content without using placeholders. |
* Drag a //HTML-code//-element into the questionnaire and enter your HTML-code. | * Drag a //HTML-code//-element into the questionnaire and enter your HTML-code. |
* Insert HTML-code using the PHP-function ''[[functions-output#html|html()]]''. The following example shows HTML-code divided into several lines for better legibility. | * Insert HTML-code using the PHP-function ''[[:en:create:functions:html|html()]]''. The following example shows HTML-code divided into several lines for better legibility. |
| |
<code php> | <code php> |