質問 - はじめに
From LimeSurvey Manual
Introduction
Once you have created your groups, you can start adding questions within each group. Create a new question by clicking on the add icon on the right hand side of the "Group" menu bar.
When adding a question, you will be asked for a "Question Code", the "Question", "Help" and a "(Question Types|question type)". All new questions are assigned to the Group you were viewing when you clicked "Add Question", however you can change the group the question belongs too at a later point.
Field descriptions
- Question code: Your ID, or number or code for the question. This field is only for quick identification for a question in export or for evaluation. Try to be consistent with your coding in this field. Planning makes your evaluation a lot easier at a later time. This field is normally not displayed to people taking the survey.
- Question: This is the actual question being asked. There is no real limit to the length of the question here, however if you want to explain how to fill out the question, leave that for the "Help" field. HTML-code can be used, e.g., for including images:
<img src="http://www.yourdomain.com/yourpics/pic.jpg">. The HTML WYSIWYG editor usually helps with the most important tasks, like including images, etc. - Help: This is an optional field. It is useful if a question needs some explanation, or you want to explain how it should be answered. When you put text in this field, a "Question Mark" icon appears on the survey entry screens with the help text right beside.
- Question type: This determines the type of response the survey allows. View the Question types section for a description of the various options available.
- Validation: This feature is available on all free text type or numeric questions. You can use standard Regular Expressions in this field to validate the responses to the question, and if the responses don't validate against this expression, the user will be prompted to try again before they can progress.
- Other?: Depending upon your chosen 'question type' this option may appear. It allows you to specify that an "other" option be presented in some of the list question types.
- Mandatory?: For all question types this setting allows you to require users to answer the question, before they can move on to the next question. For ranking question this means all items have to be ranked.
- Relevance: This is the Boolean equation that specifies the conditions for this question. If it evaluates to true, the question is show; otherwise it is hidden and since it is irrelevant, data for that question is NULLed in the database. Details about how to use Relevance can be found on the Expression Manager pages.
- Show advanced question settings: The advanced question settings are different for each question type. Please consult the documentation for your particular question type
Importing a question
At the bottom of the New Question Form you will find a file selection box to import a question file. Here you can import any question file (*.lsq or *.csv (old format)) you previously exported - for example this is useful if you want to reuse a question from another survey.
Information from tokens table
You can insert information/text from the tokens table into your question so that it can show context related information. For LimeSurvey to do this, the survey needs to be set as NOT Anonymous (ie: tracked), and it needs to have a tokens table.
The fields available for this are:
{TOKEN:FIRSTNAME} | inserts the value from the "firstname" field in the tokens table |
{TOKEN:LASTNAME} | inserts the value from the "lastname" field in the tokens table |
{TOKEN:EMAIL} | inserts the value from the "email" field in the tokens table |
{TOKEN:ATTRIBUTE_1} | inserts the value from the "attribute_1" field in the tokens table |
{TOKEN:ATTRIBUTE_2} | inserts the value from the "attribute_2" field in the tokens table |
To use this functionality you must type the field text into your question exactly as listed above. Example:
|**現在表示されている【ページ】よりも前のページにおかれた質問でなければいけません。先行する質問であっても、同じページにあるものは利用できません。 |-
|**回答を利用する質問についての、正確なアンケートID、グループID、質問IDを、次の形式で記述します: {INSERTANS:SIDXGIDXQID} - 例: {INSERTANS:1X2X3}IDはどうやったらわかるかって?それは簡単です。利用したい質問を表示させて、ブラウザのアドレスバーを見ます。URLが例えば http://foobar.com/limesurvey/admin/admin.php?sid=1&gid;=12&qid;=8 となっていれば、この質問の回答を後の質問で引用したいときには {INSERTANS:1X12X8} と入力すればOKです。
|- |*ヘルプ: 質問に解説が必要な場合や、回答の方法について説明する場合にはここに記入します。ここに文章を記入するとアンケート回答画面に「?」マークのアイコンが現れ、回答者はそれをクリックすれば回答者がヘルプを読むことができるようになります。 |- |*質問形式: 質問形式を決定します。どのような質問形式が利用できるかなど、詳細は "Question Types" を参照してください。 |- |*ラベルセット: 質問形式によってはラベルセットを用いることができます。基本言語にラベルが含まれていないと、ラベルセットは表示されません。 |- |*検証(Validation): これは自由記入タイプの質問で用いることができる機能です(自由記入(短い/長い)、日付、数字)。ここでは標準的な |Perlの正規表現 を利用して、回答が質問に対して適切であるかどうかを検証することができます。回答が正規表現にマッチしない場合、回答者は先に進む前に回答を修正するよう求められます。 |- |*その他?: 選択した質問形式によっては、このオプションが表示されることがあります。これは「その他」の選択肢を表示するかどうかを決定するものです。 |- |*質問を強制: テキスト入力以外のすべての質問について、質問を強制回答にすることができます。「はい」を選んだ場合、回答者はこの質問に回答するまで次に進むことができません。 |- |*質問の属性: 詳しくは 質問の属性 を参照してください。 |- | |-
Another example with more customisation, but using JavaScript (please see Optional settings on how to allow JavaScript when setting up questions and why it's not always a good idea. To use JavaScript you will need to deactivate the XSS filter in the Global settings):
Hello {TOKEN:FIRSTNAME}. We sent an email to you using this address {TOKEN:EMAIL}. Is this correct?
What do you as a {TOKEN:ATTRIBUTE_1} think about your
<script type="text/javascript" language="Javascript">;
var job='{TOKEN:ATTRIBUTE_1}';
if (job=='worker') {
document.write ('bosses')
} else {
document.write('workers')
}
</script>
?
What do you as a {TOKEN:ATTRIBUTE_1} think about your {if(TOKEN:ATTRIBUTE_1=='worker','bosses','workers')}?
Information from previous answers
There is currently also the capacity to insert the answer of previous questions into the text of an answer:
- You can refer to answers on the same page, and even dynamically update tailored messages as responses change on the page.
- You can use question code naming - for more details, see the Expression Manager documentation
A wizard has been integrated in the Wysiwyg HTML editor (FCKeditor), so that you can easilly insert previous question/answer codes: this plugin is called the LimeReplacementFields. In order to use this feature, in the FCKeditor, click on the "lime between brackets" icon, and select a question from the select box. Only answers from previous pages are displayed.
Styling Questions
It is possible to generally edit the question layout/design by using CSS using the template editor.