Actions

Default answers/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "'''既定値と非表示の質問に関する注意''' * 既定値を持つ非表示の質問がある場合、既定値はその質問に回答者が到達した場合のみ...")
(Updating to match new version of source page)
Line 2: Line 2:
<onlyinclude>
<onlyinclude>


TO BE UPDATED


===既定の回答 (defaults)===
=Introduction=


'''説明'''
You can assign for different question types a default value to be recorded in the case in which the survey participant skips the question or decides that he or she is happy with the provided default answer. To access this option, look for the '''edit default answers''' button located on the question panel:


リストタイプ、複数選択タイプ、自由回答タイプの質問について、既定の回答を設定します。{{NewIn|1.92}}


'''有効な値'''
<center>[[FIle:Edit default answers example.png]]</center>
*単一選択質問では、ドロップダウンボックスで所定の既定値が選ばれます。
*複数選択質問では、チェックボックスが所定の既定値に沿った状態(チェック有無)になります。
*テキスト入力型質問では{{NewIn|1.92}}、テキスト入力欄に表示する所定の文字列や[[Expression Manager/ja|式]]を設定します。式を使用する場合は中括弧も含みます。
*日付時刻質問で、日付を式で指定する場合は、date('Y-m-d')、date('Y-m-d H:i')のような形式にします。例えば、既定値として現在の時刻をHH:MM (時と分)の形式で表示したい場合、既定の回答の式ではフル形式date('Y-m-d H:s')を使用します。式における形式は質問設定のフォーマットとは独立しています。


'''例'''
*匿名でないアンケートで、{TOKEN:ATTRIBUTE_1}にその参加者の(トークンテーブル作成時の)年齢が入っているとします。アンケート内で年齢をたずねるときにその値を既定値として入れておき、正しければそのままにしてもらうか、間違っていれば変えてもらう、といったことができます。テキスト入力の既定値として、{TOKEN:ATTRIBUTE_1}と入力します。


'''既定値と非表示の質問に関する注意'''
=Valid values=
* 既定値を持つ非表示の質問がある場合、既定値はその質問に回答者が到達した場合のみセットされます。グループ全体が非表示の場合や、1問ずつ表示されるモードでは、既定値はセットされません。
*For single choice questions, you will see drop-down boxes from where you can select the desired default value.
* 非表示の質問については、別の方法として、式マネージャーで[[Expression Manager/ja#Caution_about_using_Assignment_Operator_.28.3D.29|代入演算子]]を使う方法があります。
*For multi choice questions, you will see checkboxes from where you can select the desired default state (checked or not-checked).
*For text-entry questions, you will have a text entry field in which you can enter any string or [[Expression Manager|expression]]. If you use an expression, curly brackets must be used.
*For date-time questions, if you're using an expression to set a date, the format must be like date ('Y-m-d') or date ('Y-m-d H:s'). For example, if you want to set the current time as default in a date question with format HH:MM (hour and minute), you would have to use the full time format in the default answer box: '''date ('Y-m-d H:s')'''. The format in the expression is independent of the format in the question settings.


</onlyinclude>
{{Alert|Title=Attention|text= '''Attention:'''
* If you have hidden question with default value, this default value is set only when the user come to the step of this question. This mean that if whole group his hidden, then no default value is set, or if you are in question by question mode, no default value is set.
* For hidden question, an alternative solution can be used Expression manager with [[Expression Manager#Caution_about_using_Assignment_Operator_.28.3D.29|assignment operator]].}}
 
=Example=
*You have a non-anonymous survey, where {TOKEN:ATTRIBUTE_1} is the person's age as of the time the survey participants table was created. You want to prefill a question/default answer with the person's age and ask them to validate the age or to let him or her change the age value if it is not accurate. To do that, enter {TOKEN:ATTRIBUTE_1} in the text entry field for the default answer.

Revision as of 20:25, 1 June 2018


Introduction

You can assign for different question types a default value to be recorded in the case in which the survey participant skips the question or decides that he or she is happy with the provided default answer. To access this option, look for the edit default answers button located on the question panel:



Valid values

  • For single choice questions, you will see drop-down boxes from where you can select the desired default value.
  • For multi choice questions, you will see checkboxes from where you can select the desired default state (checked or not-checked).
  • For text-entry questions, you will have a text entry field in which you can enter any string or expression. If you use an expression, curly brackets must be used.
  • For date-time questions, if you're using an expression to set a date, the format must be like date ('Y-m-d') or date ('Y-m-d H:s'). For example, if you want to set the current time as default in a date question with format HH:MM (hour and minute), you would have to use the full time format in the default answer box: date ('Y-m-d H:s'). The format in the expression is independent of the format in the question settings.
  Attention:
  • If you have hidden question with default value, this default value is set only when the user come to the step of this question. This mean that if whole group his hidden, then no default value is set, or if you are in question by question mode, no default value is set.
  • For hidden question, an alternative solution can be used Expression manager with assignment operator.


Example

  • You have a non-anonymous survey, where {TOKEN:ATTRIBUTE_1} is the person's age as of the time the survey participants table was created. You want to prefill a question/default answer with the person's age and ask them to validate the age or to let him or her change the age value if it is not accurate. To do that, enter {TOKEN:ATTRIBUTE_1} in the text entry field for the default answer.