Actions

Default answers/ja: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
Line 8: Line 8:
リストタイプ、複数選択タイプ、自由記述タイプ質問について、デフォルト値を設定します。
リストタイプ、複数選択タイプ、自由記述タイプ質問について、デフォルト値を設定します。


 
'''Valid values'''
'''値チェック'''
*For single choice questions, you will see drop-down boxes letting you  select the desired default.
*択一選択タイプでは、ドロップダウンがあらわれて、そこから選びます。
*For multi choice questions, you will see check boxs letting you select the desired default state (checked or not-checked).
*複数選択タイプでは、選択肢に対応するチェックボックスがあらわれ、そこから選びます。
*For text-entry questions{{NewIn|1.92}}, you will have a text entry field in which you can enter any string or [[Expression Manager|expression]].  If you use an expression, you need to include curly braces.
*自由入力タイプでは、そこに文字列や式[[Expression Manager|expression]]を記入できるボックスが現れます。式はカーリーで囲まれている必要があります。
* 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:i'). 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 use the full format in the default answer expression: date('Y-m-d H:s'). The format in the expression is independent of the format in the question settings.


'''例'''
'''例'''

Revision as of 13:35, 6 February 2018


デフォルト値(defaults)

説明

リストタイプ、複数選択タイプ、自由記述タイプ質問について、デフォルト値を設定します。

Valid values

  • For single choice questions, you will see drop-down boxes letting you select the desired default.
  • For multi choice questions, you will see check boxs letting you select the desired default state (checked or not-checked).
  • For text-entry questions (New in 1.92 ), you will have a text entry field in which you can enter any string or expression. If you use an expression, you need to include curly braces.
  • 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:i'). 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 use the full format in the default answer expression: date('Y-m-d H:s'). The format in the expression is independent of the format in the question settings.

  • 匿名でないアンケートで、{TOKEN:ATTRIBUTE_1}にその参加者の年齢が入っているとします。アンケート内で年齢をたずねるときにその値を初期値として入れておき、あっていればそのままにしてもらうか、間違っていれば変えてもらう、といったことができます。テキスト入力の初期値に、{TOKEN:ATTRIBUTE_1} などと入れておくことになるでしょう。

Caution with default value and hidden question

  • 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.