Actions

Question type - Numerical input/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "{{QS:hide_tip/ja}}")
(Created page with "{{QS:input_box_size/ja}}")
Line 36: Line 36:
{{QS:hide_tip/ja}}
{{QS:hide_tip/ja}}


{{QS:input_box_size}}
{{QS:input_box_size/ja}}


{{QS:Hidden}}
{{QS:Hidden}}

Revision as of 12:38, 19 May 2018

概略

この質問タイプは、アンケート参加者に数字を入力させるときに使います。



例: Question_example_numerical_input.zip.

全般オプション

回答必須

説明

このオプションにより、アンケートの質問に回答者が必ず答えるようにすることができます。回答必須の質問に回答しない場合、回答者は先に進むことができません。ある質問に複数のサブ質問があり、特定のサブ質問のみを回答必須とする場合は、ロジックタブの下にある最小回答数属性を使用します。

プレインストールされたテーマを使用している場合、必須の質問属性を有効にすると、質問の横に赤いアスタリスクが表示されます。 表示したくない場合は、こちらを参照してください。


設定可能な値

  • オン - 参加者が次のページに進む前に質問に回答する必要があります。回答の選択肢に「回答なし」は表示されません。
  • ソフト - 質問に回答せずに次のページに進もうとすると警告が表示されますが、参加者は警告を無視して先に進むことができます。「回答なし」オプションは表示されます(アンケートの表示設定で有効になっている場合)。
  • オフ(規定値) - 質問に回答しなくてもよくなります


(正規表現を使った)検証 (preg_validation)

説明

この設定は、質問内のすべての値の検証に使う正規表現を指定するものです。

質問やサブ質問への回答のどれかがこの検証要件に適合しない場合、テキスト入力欄の背景色が赤くなり、回答者が直すべき場所に気づきやすくなっています。回答者が送信ボタンを押さなくてもそれぞれの質問を検証することができます。

有効な値

  • 有効な任意の正規表現



条件(以前の"出現条件")

説明

条件の結果値が「1」または「true」になると、質問がアンケートの中で「関連する」、つまりアンケート参加者に提示されます。その他の場合は質問は表示されません。どのような質問でも関連式を指定することができます。この関数は条件の後継であり、より複雑な条件ロジックをサポートします。

構文ハイライト

条件を保存するたびに、検証され構文がハイライトされます。エラーにも色がつくので、すぐに気づいて直すことができます。

 Hint: アンケートのすべての条件が正しく使用されているか確認するには、ロジックファイルを参照してください。


有効な値

構文ハイライトによい例があります。


表示

接頭辞 (prefix)

説明

テキスト入力ボックスの前に接頭辞として表示する文字列です。接頭辞は入力部分の左側に表示されます。

画面が小さいときは、接頭辞は入力部分の上に表示されます。左側にしたい場合 (New in 3.0.0 ) : 質問にsuffix-prefix-force クラスを加えます。

有効な値

  • 入力部分の前に表示したい任意の文字列

この属性に"$"を設定すると、テキスト入力ボックスの直前にドルマークが表示されます。



接尾辞 (suffix)

説明

テキスト入力ボックスの接尾辞となるテキストです。接尾辞は入力部分の右側に表示されます。

画面が小さい場合、接尾辞は入力部分の下に表示されます。右側に表示したい場合 (New in 3.0.0 ) : 質問にsuffix-prefix-force クラスを追加します。

有効な値

  • 入力部分の後ろに表示したい任意の文字列

この属性に"%"を設定すると、テキスト入力ボックスの直後にパーセントマークが表示されます。



質問テンプレート (question_theme)

説明

それぞれの質問にカスタマイズされたテンプレートを適用することができます。

利用可能な設定

  • テンプレートパネルの質問テンプレートにある作成済みの質問テンプレート

参照: https://manual.limesurvey.org/Question_themes

注意: この機能は現在開発中です。



入力ボックスの幅 (text_input_width)

説明

この属性では、テキスト入力ボックス(のラッパー)の幅を設定します。入力ボックスは(サブ)質問に対する回答のために使われます。幅の設定値が十分に大きい場合、テキスト入力ボックスは次の行に表示されます。このオプションは、入力部分のサイズや絡む全体の幅を設定するものではないことに注意してください。

設定可能な値

  • 規定値: 選択すると、規定値はラベルと対応するテキスト入力ボックスが同じ行になるよう設定されます。例えば、テキスト入力ボックスの幅が41%の場合、テキスト入力ボックスの幅の値はラベルと入力ボックスが同じ行になる値(この場合58%)になります。テキスト入力ボックスの幅が58%以上の場合、テキスト入力ボックスは次の行に表示されます。
  • 8%; 17%...92%, 100%: 選択値が大きくなるほどテキスト入力ボックスが大きくなります。

  • サブ質問/ラベルの下に入力部分を表示させたい場合は、ドロップダウンリストから100%を選択します。


TIP非表示 (hide_tip)

説明

多くの質問では、「以下からひとつだけ選択してください」のような注記(tip)や質問への回答方法を示すテキストが表示されます。この属性で、tipやヒントを表示するかしないかを設定できます。

こうしたtipやヒントには、検証基準(最小/最大回答数、最小/最大/合計値)に関するメッセージが含まれます。hide_tipをオンにすると、こうしたメッセージは表示されませんが、無効なデータを入力するとtipが表示されます。赤色で表示されますが、検証基準を満たすと緑色になります。

利用可能な設定値

  • オン - tipやヒント非表示
  • オフ(規定値)



テキスト入力ボックスのサイズ (input_box_size)

 Hint: この機能は、バージョン3.0.0以降で使用できます。


説明

この機能は、テキスト領域(テキスト入力ボックス)のサイズを指定するものです。何も設定しなければ、LimeSurveyは入力ボックスを既定のサイズで表示します。この設定で既定の動作を変えることができます。

ボックスを次の行に移動させたい場合、ラッパーのサイズを大きくします。テキスト入力幅属性の値を大きくします。

有効な値

  • 任意の数値


Always hide this question (hidden)

Description

If enabled, the question will always be hidden - it will not be displayed to the survey participants. This function can be used in the following scenarios:

  • If you wish to prefill a question with a URL and you want not to have it displayed on the screen. This overrides any conditions used within the survey because the respective question will not even be embedded on the page.
  • If you wish to store or calculate a value on the fly via the ExpressionScript - Presentation.
Note: A common question type that is used with this function is the Equation one.

Available options

  • On
  • Off (default)


CSS class (css_class)

Description

If you want to add special CSS classes to certain questions, you can enter the CSS class name(s) in this box. Make sure you leave an empty space between different class names.

Valid values

  • Any text string with a space between different CSS class names.
 Hint: You can also insert an expression in this box (New in 3.0.0 ). Remember that the output of the expression will not be updated dynamically.


  According to the W3C, CSS class names can contain only the characters [a-zA-Z, and 0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_). They cannot start with a digit, or a hyphen followed by a digit. LimeSurvey encodes CSS classes, but it does not fix it totally.



Relevance help for printable survey (printable_survey_relevance_help)

Description

If you wish to print a survey, you can also print the relevance equations for each question. But, if you wish to offer instead an explanation rather than the expression on the printed form, fill in this box with the text explanation for the relevance equation.

Valid values

  • Any text and/or numbers you wish to be displayed on the printable form.


Input

Maximum characters (maximum_chars)

Description

This allows you to set the maximum number of characters that can be entered for a text based question. Entering a value of, say, 20 will mean that the participant cannot enter any more than 20 characters.

Valid values

  • Any integer value above 0



Minimum value of the numeric input (min_num_value_n)

Description

Minimum value of the numeric input that can be introduced in the input box by the respondent.

Valid values

  • Any integer value above 0
  • Any number
  • Any SGQA code
  • Any question code (variable name)
  • Any equation, using ExpressionScript syntax, without surrounding curly braces.



Integer only (num_value_int_only)

Description

If enabled, the respondents will be able to introduce in the box only integer values.

Available options

  • Yes
  • No (default)



Maximum value of the numerical input (max_num_value_n)

Description

Maximum value of the numeric input that can be introduced in the input box by the respondent.

Valid values

  • Any integer value above 0
  • Any number
  • Any SGQA code
  • Any question code (variable name)
  • Any equation, using ExpressionScript syntax, without surrounding curly braces.


Logic

Randomization group name (random_group)

Description

It places the questions into a specified randomization group, all questions included in the specified group being displayed in a random order to the survey respondents.

You can find a sample survey using randomization group name in ExpressionScript sample survey.

Valid values

Just enter any string you like (for example: 'group1'). All question which have set the same string within the randomization group name box will have their place in the survey randomized (=randomly exchanged among each other).


Preview To preview the questions use the preview survey instead of the preview question group function, as the second has been reported to not show the questions in a randomized order.



Question validation equation (em_validation_q)

Description

This is an equation that is used to validate the entire question (e.g, all of its parts collectively for a multi-answer question). If the question fails the validation criteria, then em_validation_q_tip message will be displayed (it uses the CSS style .error). This tip uses the .em_q_fn_validation CSS style, which is hidden by default within template.css.

The main difference between this feature and the subquestion validation equations (em_validation_sq option) is that for this feature, if the question (or question parts) fail validation, then an error message could be shown. For the subquestion validation, each text entry cell (e.g., in an array question type, but it can also be applied to single entry question types) will be styled so that the background color is (light) red.

Valid values

  • Any equation that makes use of the ExpressionScript syntax, without surrounding curly braces.

Example

  • You want to collect demographic information from users via a multiple short text question, and you want to validate that the user has entered a valid email address and phone number.

This example shows how the question looks with invalid answers:

And here is what it looks like with one invalid answer:

Here is how you edit a question to enter that information:

And here is part of the Show Logic File output that lets you check the accuracy of your expression and ensure that there are no syntax errors:

As you can see, the validation equation tests that both the email and phone number are either empty or match a regular expression filter.

The validation tip only shows the warning message if the phone or email appears invalid.

 Hint: In order to create complex validation messages, read about the usage of the ExpressionScript.


If you wish to import the example from above into your LimeSurvey installation, download the following .lsq file: Em_validation_q_example.zip.

 Hint: Remember, LimeSuvey uses the Perl syntax for regular expressions, so they should start and end with / (slash character)!



Tip for whole question validation equation (em_validation_q_tip)

Description

If you are using the question validation equation, you can use this box in order to display an optional message as question tip on how the question has to be filled out.

Valid values

Example

See the example from the question validation equation wiki section- it shows how the tip can be tailored to show which parts of a multiple short text question fail the validation criteria.



Sub-question validation equation (em_validation_sq)

Description

This is an equation that is used to validate each subquestion (text field) individually. Any text field that does not pass these validation conditions will have its background color turned pink (using the .em_sq_fn_validation CSS style) to highlight the error. Note that this is available in addition to the regular expression-based validation option.

Valid values

Any equation that makes use of the ExpressionScript syntax, without surrounding curly braces.

Examples

For example, if you want to allow only numbers that are a multiple of 3 as answers, the equation would be:

(this / 3) == floor(this/3)

The reserved variable this is automatically replaced by a reference to the active text entry cell.



Tip for sub-question validation equation (em_validation_sq_tip)

Description

If you are using em_validation_sq, this is an optional message/tip that will be displayed if the introduced answer is incorrect.

Valid values

  • Any string

Example

  • Continuing the example of validating emails, the tip might be "Please enter valid email addresses."


Other

Insert page break in printable view (page_break)

Description

This attribute is only active when you actually print a survey from the Printable View. It forces a page break before the question.

Available options

  • On
  • Off (default)


Statistics

Show in public statistics (public_statistics)

Description

This attribute allows the survey administrator to chose if a particular question results should be displayed to the survey participants after they submitted the survey.

Note: To have the statistics displayed on the last page, do not forget to enable this functionality from the presentation & navigation settings. Otherwise, no statistics link will be displayed at the end of your survey.

The default setting for each question is 'Off' (=Do not show the question statistics to the respondents). You have to enable this for every single question if you want to show the survey statistics of that (those) particular question(s) to the survey participants after the survey submission.

Available options

  • On
  • Off (default)



Display chart (display_chart)

Description

This attribute allows the survey administrator to choose if a chart that contains the question results should be displayed to the survey participants after they filled out the survey.

Note: To have the chart displayed on the last page, you have to enable the following options:


Available options

  • On
  • Off (default)



Chart type (chart_type)

Description

This attribute allows the survey administrator to choose which type of chart will be displayed to the respondent once he/she finished filling out the survey.

Note: Do not forget to change the question and survey settings in order to have the charts displayed at the end on the survey. For more details, check the wiki section on the display chart question attribute.

Available options

  • Bar chart
  • Pie chart
  • Radar
  • Line
  • PolarArea
  • Doughnut