Actions

Default answers/ja: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
No edit summary
 
(25 intermediate revisions by 3 users not shown)
Line 3: Line 3:




=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:
 
アンケート参加者が回答を飛ばした時や、既定の回答と同じ意見の場合、様々な質問タイプに既定の回答値を設定し、記録することができます。このオプションにアクセスするには、質問パネルにある'''既定の回答を編集'''ボタンをクリックします。




Line 11: Line 12:




=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 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.
*複数選択質問では、チェックボックスで既定の状態(チェックの有無)にします。
*テキスト入力質問では、テキストフィールドにテキストや[[ExpressionScript - Presentation/ja|]]を入力します。式を使う場合は、中括弧で囲みます。
*日付時刻型の質問で固定値を設定する場合は、その固定値はYYYY-MM-DD形式(例:2022-02-28)にする必要があります。式によって日付を指定する場合、フォーマットはdate ('Y-m-d')またはdate ('Y-m-d H:s')の形式にします。例えば、現在の時刻をHH:MM(時、分)のフォーマットを使って既定値にしたい場合、完全な時刻フォーマット(date ('Y-m-d H:s'))を既定の回答ボックスに設定します。式の中のフォーマットは、質問設定のフォーマットとは別のものです。
 
{{Alert|Title=注意|text= '''注意:'''
* 非表示の質問については、別の方法として、ExpressionScriptで[[ExpressionScript - Presentation/ja#.E4.BB.A3.E5.85.A5.E6.BC.94.E7.AE.97.E5.AD.90.EF.BC.88.3D.EF.BC.89.E3.82.92.E4.BD.BF.E7.94.A8.E3.81.99.E3.82.8B.E9.9A.9B.E3.81.AE.E6.B3.A8.E6.84.8F|代入演算子]]を使う方法があります。}}
 
 
=ExpressionScriptと既定値=
 
 
アンケート管理者が既定値の指定に[[ExpressionScript - Presentation/ja|ExpressionScript]]を使うことができるのは、"テキスト"と"はい/いいえ"質問タイプだけです。その他の質問タイプでは、[[ExpressionScript - Presentation/ja#.E4.BB.A3.E5.85.A5.E6.BC.94.E7.AE.97.E5.AD.90.E3.82.92.E4.BD.BF.E7.94.A8.E3.81.99.E3.82.8B|代入演算子]]を使うことができます。
 
 
=例=


{{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=
*匿名式でないアンケートを実施し、{TOKEN:ATTRIBUTE_1}をアンケート参加者テーブルが作成された時点の年齢だとします。年齢付きの質問に既定値をセットして提示することにより、その年齢が正しいか確認したり、間違っていたら正しいものに入れなおすようお願いしたりすることができます。この場合、既定の回答のテキスト入力欄に{TOKEN:ATTRIBUTE_1}と入力します。
*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.

Latest revision as of 10:40, 26 February 2023


はじめに

アンケート参加者が回答を飛ばした時や、既定の回答と同じ意見の場合、様々な質問タイプに既定の回答値を設定し、記録することができます。このオプションにアクセスするには、質問パネルにある既定の回答を編集ボタンをクリックします。



有効な値

  • 択一質問では、ドロップダウンリストで既定値としたいものを選択します。
  • 複数選択質問では、チェックボックスで既定の状態(チェックの有無)にします。
  • テキスト入力質問では、テキストフィールドにテキストやを入力します。式を使う場合は、中括弧で囲みます。
  • 日付時刻型の質問で固定値を設定する場合は、その固定値はYYYY-MM-DD形式(例:2022-02-28)にする必要があります。式によって日付を指定する場合、フォーマットはdate ('Y-m-d')またはdate ('Y-m-d H:s')の形式にします。例えば、現在の時刻をHH:MM(時、分)のフォーマットを使って既定値にしたい場合、完全な時刻フォーマット(date ('Y-m-d H:s'))を既定の回答ボックスに設定します。式の中のフォーマットは、質問設定のフォーマットとは別のものです。
  注意:
  • 非表示の質問については、別の方法として、ExpressionScriptで代入演算子を使う方法があります。



ExpressionScriptと既定値

アンケート管理者が既定値の指定にExpressionScriptを使うことができるのは、"テキスト"と"はい/いいえ"質問タイプだけです。その他の質問タイプでは、代入演算子を使うことができます。


  • 匿名式でないアンケートを実施し、{TOKEN:ATTRIBUTE_1}をアンケート参加者テーブルが作成された時点の年齢だとします。年齢付きの質問に既定値をセットして提示することにより、その年齢が正しいか確認したり、間違っていたら正しいものに入れなおすようお願いしたりすることができます。この場合、既定の回答のテキスト入力欄に{TOKEN:ATTRIBUTE_1}と入力します。