Actions

QS

Numbers only/zh-cn: Difference between revisions

From LimeSurvey Manual

(Created page with "如果你启用了该选项,参与者就只能在文本框里输入数字。")
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
如果你启用了该选项,参与者就只能在文本框里输入数字。
如果你启用了该选项,参与者就只能在文本框里输入数字。


For the '''equation question types''', this setting indicates that the result could only be a number, not a string. This will guarantee proper calculations/conversions in follow-up equations regarding the decimal mark.
对于 '''方程式问题类型''', 这个设置明确了结果只能是数字,不是字符串。这将保证在有关小数点的后续方程式中进行正确的计算/转换。


'''Behavior by question type'''
'''不同问题类型的行为'''
# '''Default''':  If the subject enters a value that is not a number, that value is immediately cleared from the text box so that the subject can enter an appropriate value.
# '''默认''':  如果主题里输入的值不是数字,那这个值就会立即被清除掉,以便输入一个合适的值。
# '''Array (Texts)''': If the '''numbers only''' option is disabled, the "Show totals for" and "Show grand total" options will be overruled, while the total text boxes will '''not''' be displayed.
# '''阵列 (文本)''': 如果 '''仅数字''' 的选项被禁用了,那么 "显示合计" "显示总计" 的选项就会被覆盖,整个文本框就会 '''''' 显示。
# '''Equation''': Enabling this option will force the equation results to be converted to a numeric value. If the equation result is not a number (and not blank), the equation will return NaN, being saved as an empty string in the response table.
# '''方程式''': 启用这个选项会将方程式的结果强制转换成数值。如果方程式的结果不是数字 (也不为空), 方程式会返回 NaN, 并在反馈表里被保存成一个空的字符串。


'''Available options'''
'''可用选项'''
*On
*
*Off (default)
*(默认)
</onlyinclude>
</onlyinclude>


[[Category:Question Settings]][[Category:Other Question Options]]
[[Category:Question Settings/zh-cn]][[Category:Question Display Options]]

Latest revision as of 09:53, 11 September 2020


仅数字 (numbers_only)

说明

如果你启用了该选项,参与者就只能在文本框里输入数字。

对于 方程式问题类型, 这个设置明确了结果只能是数字,不是字符串。这将保证在有关小数点的后续方程式中进行正确的计算/转换。

不同问题类型的行为

  1. 默认: 如果主题里输入的值不是数字,那这个值就会立即被清除掉,以便输入一个合适的值。
  2. 阵列 (文本): 如果 仅数字 的选项被禁用了,那么 "显示合计" 和 "显示总计" 的选项就会被覆盖,整个文本框就会 显示。
  3. 方程式: 启用这个选项会将方程式的结果强制转换成数值。如果方程式的结果不是数字 (也不为空), 方程式会返回 NaN, 并在反馈表里被保存成一个空的字符串。

可用选项

  • 关 (默认)