Differences
This shows you the differences between two versions of the page.
| Next revisionBoth sides next revision |
en:create:inputs-single [25.06.2013 17:24] – created janisaltherr | en:create:inputs-single [18.12.2014 20:51] – admin |
---|
**Important:** The question types "selection" and "multiple choice" provide this function by simply checking a box. See [[selection-textinput|Free text inputs within a selection]] how to do this. | **Important:** The question types "selection" and "multiple choice" provide this function by simply checking a box. See [[selection-textinput|Free text inputs within a selection]] how to do this. |
| |
How to achieve a similar output with scales and other question types and how to provide a dropdown selection inside another question is described here. SoSciSurvey provides the PHP-function ''[[functions-output#prepare_input|prepare_input()]]'' to achieve this. We will guide you through using this function using the following example. | How to achieve a similar output with scales and other question types and how to provide a dropdown selection inside another question is described here. SoSciSurvey provides the PHP-function ''[[:en:create:functions:prepare_input|prepare_input()]]'' to achieve this. We will guide you through using this function using the following example. |
| |
{{:en:create:scr.inputs-single.complete.png?nolink|Example for freely placed input fields}} | {{:en:create:scr.inputs-single.complete.png?nolink|Example for freely placed input fields}} |
The other input field is a dropdown selection. We don't just need one item but the whole question "ZE03". So you simply don't mention the item ID inside the placeholder: You use "%ZE03%". | The other input field is a dropdown selection. We don't just need one item but the whole question "ZE03". So you simply don't mention the item ID inside the placeholder: You use "%ZE03%". |
| |
As the preview still won't show much, you need to use php when assembling the questionnaire. When creating the questionnaire, add the element //PHP-code// ([[php|short guide to php]]). In this php-code, the input fields are prepared with [[functions-output#prepare_input|prepare_input()]] first, afterwards (!) you call the superior question ZE01 with its placeholder-items. | As the preview still won't show much, you need to use php when assembling the questionnaire. When creating the questionnaire, add the element //PHP-code// ([[php|short guide to php]]). In this php-code, the input fields are prepared with [[:en:create:functions:prepare_input|prepare_input()]] first, afterwards (!) you call the superior question ZE01 with its placeholder-items. |
| |
<code php> | <code php> |