Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:create:transfer-responses [31.03.2016 16:24]
hotaitde
en:create:transfer-responses [31.03.2016 16:26]
hotaitde
Line 1: Line 1:
-Insert Answer Texts in Follow-up Questions+**Insert Answer Texts in Follow-up Questions**
 Placeholders allow you to use participants‘ text inputs elsewhere in the questionnaire. This chapter provides you with a number of examples. Placeholders allow you to use participants‘ text inputs elsewhere in the questionnaire. This chapter provides you with a number of examples.
    
-Note: If in a follow-up question you only want to display specific scale items or select options dependent on the participant’s response, please refer to Use Selected Items In Another Question.+**Note:** If in a follow-up question you only want to display specific scale items or select options dependent on the participant’s response, please refer to Use Selected Items In Another Question.
  
-Note: If you haven’t worked with filters and PHP code, please refer to chapters Introduction to PHP and Problem Solution for Filters first.+**Note:** If you haven’t worked with filters and PHP code, please refer to chapters Introduction to PHP and Problem Solution for Filters first.
  
  
-Use Single Answers+**Use Single Answers**
 On page 2 the participant mentioned the name of a TV presenter in a text input field (tagging TX01_01). Answer validation was applied to ensure the participant did enter something. The entered name is now to be included in following question texts or scale items. ​ On page 2 the participant mentioned the name of a TV presenter in a text input field (tagging TX01_01). Answer validation was applied to ensure the participant did enter something. The entered name is now to be included in following question texts or scale items. ​
  
Line 19: Line 19:
 Please assess <​strong>​%tvpresenter%</​strong>​ with regard to the following characteristics. Please assess <​strong>​%tvpresenter%</​strong>​ with regard to the following characteristics.
  
-Note: It is not possible to use replace() to display the participant’s entry immediately on the same page of the questionnaire. This function would require JavaScript.+**Note:** It is not possible to use replace() to display the participant’s entry immediately on the same page of the questionnaire. This function would require JavaScript.
  
-Note: In order to check if the placeholder functions correctly, you need to re-start the questionnaire from the beginning – or at least from the page with the text input field where the relevant name was entered (in the example on page 2).+**Note:** In order to check if the placeholder functions correctly, you need to re-start the questionnaire from the beginning – or at least from the page with the text input field where the relevant name was entered (in the example on page 2).
  
-Tip: Once a placeholder has been created, it remains valid for any following pages in the questionnaire. Repeating the PHP code on every page is not required. ​+**Tip:** Once a placeholder has been created, it remains valid for any following pages in the questionnaire. Repeating the PHP code on every page is not required. ​
  
-Tip: The above described PHP code also allows you to enter predefined answers (e.g. from a multi-choice question) in follow-up questions.+**Tip:** The above described PHP code also allows you to enter predefined answers (e.g. from a multi-choice question) in follow-up questions.
  
-Tip: As an alternative,​ the participant’s entry can be read out via value() and subsequently be transferred to replace().+**Tip:** As an alternative,​ the participant’s entry can be read out via value() and subsequently be transferred to replace().
  
    
  
  
-Insert Several Answer Texts+**Insert Several Answer Texts**
 A question of the question type “Text Input” (“TX01”) or “Free Mention” (“TX02”) is presented to the participant. Up to 10 answers can be chosen. In a follow-up question (e. g. multiple selection, rank, scale) the answers are to be displayed as items or options. ​ A question of the question type “Text Input” (“TX01”) or “Free Mention” (“TX02”) is presented to the participant. Up to 10 answers can be chosen. In a follow-up question (e. g. multiple selection, rank, scale) the answers are to be displayed as items or options. ​
  
Line 41: Line 41:
    
  
-Tip: Of course, additional text may be added to the placeholders,​ e. g. “evaluation%text1%”.+**Tip:** Of course, additional text may be added to the placeholders,​ e. g. “evaluation%text1%”.
  
 Via value() the following PHP code reads out all of  the ten possible text input fields, checks if an entry has been made, creates the placeholders %text1% to %text10% ​ and displays question FQ01 with the matching items/​options. Via value() the following PHP code reads out all of  the ten possible text input fields, checks if an entry has been made, creates the placeholders %text1% to %text10% ​ and displays question FQ01 with the matching items/​options.
  
-Important: The PHP codes for “Text Input“ and “Free Mention” differ slightly in line 4, because the variables are determined according to different patterns (“TX01_01” vs. “TX02x01”).+**Important:** The PHP codes for “Text Input“ and “Free Mention” differ slightly in line 4, because the variables are determined according to different patterns (“TX01_01” vs. “TX02x01”).
  
    
Line 51: Line 51:
 Explanatory note on the PHP code: The IF filter at the end ensures that the follow-up question is skipped if the participant has not completed the relevant field. Through trim() blank spaces at the beginning and end of the text entered are removed so that a number of blanks entered into a text field are not interpreted as a valid answer. ​ Through sprintf() with its parameter %02d it is ensured that numbers are displayed as double-digits with leading zeros (e. g. 01 instead of 1). Explanatory note on the PHP code: The IF filter at the end ensures that the follow-up question is skipped if the participant has not completed the relevant field. Through trim() blank spaces at the beginning and end of the text entered are removed so that a number of blanks entered into a text field are not interpreted as a valid answer. ​ Through sprintf() with its parameter %02d it is ensured that numbers are displayed as double-digits with leading zeros (e. g. 01 instead of 1).
  
-Note: If the PHP code does not provide the required results, please refer to chapter Problem Solution for Filters.+**Note:** If the PHP code does not provide the required results, please refer to chapter Problem Solution for Filters.
  
  
  
en/create/transfer-responses.txt · Last modified: 01.04.2016 15:44 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki