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

Preventing Mouse Scroll Changes on Number Fields

One frequent issue reported by users is that scrolling the mouse wheel while hovering over a number input field can unintentionally increase or decrease the value. Here’s how to prevent that from happening.

Steps to Implement:

  1. Change the Input Type:
    1. Set the field type to Text instead of Number.
  2. Apply a Validator:
    1. Add a validator to ensure only numeric input is accepted..

Optional Enhancements:

  • Set a minimum (e.g., 1) and maximum value (e.g., 5) to limit the range of acceptable responses.
  • Add a custom error message to guide users when they enter invalid input. 

Example Custom Error Message:  “Please enter a number between 1 and 5.”

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.”

  • Set a maximum length (e.g., 1) to further control data entry.

The user will not be able to enter more digits than the maximum length allows when completing the survey.

Important Note on Data Type and Filtering

While this configuration ensures only numeric values are entered, the value will be stored as text. If you need to search or filter numerically (e.g., “greater than 2”), this setup alone is not sufficient.

To enable numeric filtering:

  • Create a secondary hidden number field.
  • Connect your Custom Variable to the hidden number field.
  • Use logic to copy the value from the validated text field to the hidden number field.