Actions

Question type - Numerical input/en: Difference between revisions

From LimeSurvey Manual

(Importing a new version from external source)
(Importing a new version from external source)
Line 28: Line 28:
Please note that the attributes 'Minimum value' and 'Maximum value' are only available from v1.91 or newer.
Please note that the attributes 'Minimum value' and 'Maximum value' are only available from v1.91 or newer.


{INCLUDE(page="Advanced question settings",start="!prefix",stop="---")}{INCLUDE}
{{QS:Prefix}}


{INCLUDE(page="Advanced question settings",start="!suffix",stop="---")}{INCLUDE}
{INCLUDE(page="Advanced question settings",start="!suffix",stop="---")}{INCLUDE}

Revision as of 05:30, 13 June 2013

Short description

This question types asks the survey participant to enter a single number.


Core settings

Mandatory

Description

This option allows the survey administrators to request their respondents to answer certain survey questions. If the mandatory questions are not answered, the respondents will not be able to proceed further. If you have a question with multiple subquestions, and you require only certain subquestions to be answered, use the minimum answer attribute located under the Logic tab.

If you use any of the preinstalled themes and the mandatory question attribute is enabled, a red asterisk will be shown next to the question. If you wish to hide it, please check these instructions.


Available options

  • On - Question must be answered before the participant can proceed to the next page - the answer option 'No answer' is never shown.
  • Soft - If the question is not answered, a warning is shown when trying to proceed to the next page - however, the participant can choose to ignore the warning and proceed. Note that the 'No answer' option is still shown (if activated in survey presentation settings)
  • Off (default) - Question can be left unanswered


Validation (using regular expressions) (preg_validation)

Description

This option lets you specify a regular expression with which you can validate all the parts of a question.

If any question or subquestion value does not meet the validation requirements, the background colour of the text entry field will be changed to red so that users can easily see which parts of the question need to be corrected. Thus, you can do on-page validation. In this way you will not need to wait for the user to click on the submit button to validate the respective question.

Valid values

  • Any valid regular expression

Example


These Core Settings are available in Version 1.92 and beyond

QS:Defaults


Condition (previously "Relevance equation")

Description

If the result value of the condition is "1" or "true", the question is "relevant" in the survey context, i.e. it is shown to the survey participant. If not, the question is hidden. Any survey question allows you to specify a relevance equation. This function is the successor of conditions and supports much more complex conditional logic.

Syntax Highlighting

Whenever you save the condition, it is evaluated and syntax-highlighted. Any errors will be color coded so that you can quickly detect and fix them.

 Hint: To check if all conditions are used correctly within your survey, read about our show logic file feature.


Valid values

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

Examples

Here are good examples of syntax highlighting.


Advanced settings

Please note that the attributes 'Minimum value' and 'Maximum value' are only available from v1.91 or newer.


Prefix (prefix)

Description

A text value to be shown as prefix before the text input box(es). The prefix is shown just left of the input.

If the screen is small, then the prefix will be displayed above the input. If you want to leave it on the left (New in 3.0.0 ) : add suffix-prefix-force class to the question.

Valid values

  • Any character or set of characters you wish to be displayed before the input

Example

Entering a value of "$" for this attribute would result in a dollar sign being displayed immediately preceding the text input box.


{INCLUDE(page="Advanced question settings",start="!suffix",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!hide_tip",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!random_group",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!text_input_width",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!hidden",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!num_value_int_only",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!maximum_chars",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!min_num_value_n",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!max_num_value_n",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!page_break",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!public_statistics",stop="---")}{INCLUDE}

These Advanced Settings are available in Version 1.92 and beyond

{INCLUDE(page="Advanced question settings",start="!em_validation_q",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!em_validation_q_tip",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!em_validation_sq",stop="---")}{INCLUDE}

{INCLUDE(page="Advanced question settings",start="!em_validation_sq_tip",stop="---")}{INCLUDE}