Skip to content
  • There are no suggestions because the search field is empty.

Preventing Mouse Scroll Changes on Number Fields

When a respondent scrolls with the mouse wheel while the pointer is over a Number input, the field may increase or decrease the value. To prevent accidental changes, use a Text input with a Numeric validator in EnrollNow Survey Creator.

Configure the question

  1. In Survey Creator, select the question you want to update.
  2. In the question settings, change Input Type from Number to Text.
  3. Under Validators, add a Numeric validator. The validator checks that the response is a number.

Optional Enhancements: 

Set an allowed range and error message

To limit the response to a range, set a minimum and maximum on the Numeric validator. For example, set the minimum to 1 and the maximum to 5.

You can also add a custom error message, such as “Please enter a number between 1 and 5.” This message appears when a number falls outside the configured range. If a respondent enters a non-numeric value, EnrollNow displays the standard message “The value should be numeric.”

If the response should be a single digit, set Maximum Length to 1. This setting limits the total number of characters a respondent can enter, including any decimal point or minus sign.

Note:  This custom error message will only display when the user enters a value outside the defined min/max range. If the user enters a non-numeric value, they will see the standard system message: “The value should be numeric.”

    Store the response for numeric filtering

    A validated Text input still stores the response as text. To use numeric filters such as greater than 2, store the response in a separate numeric field.

    1. Add a second question, set its Input Type to Number, and hide it from respondents.
    2. Map the hidden field to your numeric Custom Variable.
    3. Configure survey logic to convert the validated text response to a number and store it in the hidden field. 

    Before publishing, test the survey with a valid number, an out-of-range number, and a non-numeric entry. If you added the hidden field, also verify that a submitted response can be filtered numerically.