Is it possible to create a condition that the field cant be zero?

  • marcellobrazil
    Asked on July 28, 2017 at 6:47 AM

    My doubt here if the field difference "0" to "00", cause I imagined to create a "text field" and make the condition (This field cant be zero), something like that

  • BJoanna
    Replied on July 28, 2017 at 11:28 AM

    You can use the Show/Hide Field conditional logic to show a custom message (Text field) if the entered value inside of the field is '0'. You should also hide submit button to prevent your users from submitting the form. 

    How to Show or Hide Fields Base on User's Answer

    Here is my demo form: https://form.jotformpro.com/72084746469973

    Feel free to test it and clone it

    I have set my condition like this.

    Is it possible to create a condition that the field cant be zero? Image 1 Screenshot 20

    You can set the same condition for '00'.

    Hope this will help. 

  • marcellobrazil
    Replied on July 31, 2017 at 10:43 AM

    but if the person fill with 000 or 0000?

  • BJoanna
    Replied on July 31, 2017 at 12:20 PM

    You can set the conditions for '00' and '000' as well or you can use the Short Text Entry (Text box) field instead of the Number field, set the validation to Numeric and use Starts With conditional state. 

    Is it possible to create a condition that the field cant be zero? Image 1 Screenshot 30

    Is it possible to create a condition that the field cant be zero? Image 2 Screenshot 41

    Here is my new demo form: https://form.jotformpro.com/72114487749970 

  • marcellobrazil
    Replied on July 31, 2017 at 12:26 PM

    NICE THANKS!!

    in my form https://www.jotform.com/build/71623331927657

    I created a rule if the NCM is 0000.00.00 a text will appear and it will hide the next button, but the next button still there, do you know why?

    also in this form, for the specials fields (ICMS, IPI, MVA, PIS, COFINS) can I create the rule that you answer above?

  • marcellobrazil
    Replied on July 31, 2017 at 12:29 PM

    in your form it is possible to write 01

  • BJoanna
    Replied on July 31, 2017 at 2:11 PM

    I tested your form and condition that you have set for the NCM field is working correctly. When I entered 0000.00.00 in the NCM field the custom error message was shown and the 'Next' button was hidden.

    Is it possible to create a condition that the field cant be zero? Image 1 Screenshot 20

    You can the create similar conditions for the fields (ICMS, IPI, MVA, PIS, COFINS).

    Regarding my demo form - It is possible to write 01. That option is not disabled. 

    If you still have issues with the conditions for the field NCM, please explain in more details what exactly are you trying to achieve. Which numbers should not be allowed? You can provide us the list of the numbers. 

  • marcellobrazil
    Replied on July 31, 2017 at 2:20 PM

    I wanna disable all the answers begging with 0. I tried before to create conditions for those fields (ICMS, IPI, MVA, PIS COFINS) but I couldnt cause they are special fields, now can I make conditions for them?

  • BJoanna
    Replied on July 31, 2017 at 2:44 PM

    If you want to disable all the answers begging with 0, you should use the Starts With conditional state and set your condition like this.

    Is it possible to create a condition that the field cant be zero? Image 1 Screenshot 30

    You can use the same conditional state for the fields (ICMS, IPI, MVA, PIS COFINS).

    Is it possible to create a condition that the field cant be zero? Image 2 Screenshot 41