Matrix Field: How can I prevent a negative number from being entered?

  • Jerole
    Asked on November 7, 2016 at 2:37 PM

    I have an order form using radio check and a matrix. I am exporting it into FileMaker to create several custom reports for all those that need to know for order fulfillment.

    I noticed 1 field was a negative number. How do I prevent this?

     

  • Support_Management Jotform Support
    Replied on November 7, 2016 at 6:36 PM

    Hello, since you never mentioned which field you're referring to, I checked your Submissions and found a negative value on your Matrix Field:

    Matrix Field: How can I prevent a negative number from being entered? Image 1 Screenshot 60

    If that's what you're referring to, then no, there's no innate feature/option to prevent users from entering negative values on the Numeric Textbox of a Matrix Field.

    As a workaround, you may use a visual cue (an error message of sort) that will tell them that it's not allowed by using Conditions and a Text Field. Here's what I had in mind:

    Matrix Field: How can I prevent a negative number from being entered? Image 2 Screenshot 71

    To achieve that, just do the following:

    1. Drag a Text field to your form.

    Matrix Field: How can I prevent a negative number from being entered? Image 3 Screenshot 82

    2. Create your condition as shown below:

    Matrix Field: How can I prevent a negative number from being entered? Image 4 Screenshot 93

    This means that IF the Matrix Field contains a - THEN show the visual cue that Negative Values are not allowed (optionally, you may also hide the Submit button to prevent them from sending the form if the visual cue error is displayed)

    Matrix Field: How can I prevent a negative number from being entered? Image 5 Screenshot 104

    Here's a cloned copy of your form https://jotform.com/63117369684970 showing that. Feel free to clone it if you need to see how I set it up.

  • Jerole
    Replied on November 7, 2016 at 7:04 PM

    Thanks I'll give it a try.