Query related to certain conditions on my form

  • PrudenceFest
    Asked on October 18, 2019 at 1:57 AM

    Hi there!

    I've made the tests and I got confused about something.

    How does conditions works? I made this conditions (see image) for my form (see link https://form.jotformz.com/92898519795685) and its not working.

    1571377761Screen Shot 2019 10 18 at 02 Screenshot 10

    As you can see I want the CODIGO label to work like this:

    - Accept form that always end with A, B or C. (if not end like this, an error message should show up but isn't)

    - Shouldn't accept efghijklmnopqrtuvxwyz letters. (but is accepting)

    - Shouldn't accept special caracteres. (but is accepting)

    Did I made something wrong?

    I'll appreciate the help :)

  • Nik_C
    Replied on October 18, 2019 at 3:58 AM

    The first issue is that you have ALL in condition, meaning all have to be true in order to unrequire that field:

    1571385187Screenshot 2019 10 18 at 09 Screenshot 10

    A second problem is a way you want to check values, for example ending with "abc", that would work if a word is testabc

    So it checks for all values. If you want to check for a or b or c, it should be:

    1571385297Screenshot 2019 10 18 at 09 Screenshot 21

    The same applies for your "doesn not contain" conditions:

    1571385381Screenshot 2019 10 18 at 09 Screenshot 32

    You have to check values individually.

    What I said above with ALL setting, you can still use it, but that would check everything:

    If text entered ends with a and b and c and starts with s and d and so on. And that might not work as you intended.

    Hope it helps.

    Thank you!



  • PrudenceFest
    Replied on October 18, 2019 at 2:33 PM

    Oh thank you! I'll test again. and see if it works.

    I appreciate the help!

  • PrudenceFest
    Replied on October 18, 2019 at 3:29 PM

    Hey Nik_C,


    I've made the changes and tested again but the label CODIGO are still accepting everything.


    https://form.jotformz.com/92898519795685


    Seems like I'm doing something wrong, can you help me identify? I just want the label to not accept some letters, some special characters and also starting and finishing with certain letters.


    This will make my form not accept fake CODIGOS (codes).


    If you can show me exactly what to do, this will help a lot!


    I appreciate the support again. My best regards!


  • Mike_G JotForm Support
    Replied on October 18, 2019 at 4:00 PM

    I have checked your form. To fix the issue, please try setting the condition's ANY-ALL to "ALL".

    1571428754zt15 58 52 Screenshot 10

    Also, you can just separate each value with a comma (please refer to the image below) and it should work the same.

    1571428786zt15 58 52 Screenshot 21

  • PrudenceFest
    Replied on October 19, 2019 at 7:13 PM

    Hey Mike, I made the changes but are still not working as intended.

    I created a random code with the letters that cannot be used/accepted but it was given as a valid code. :(

  • Mike_G JotForm Support
    Replied on October 19, 2019 at 7:53 PM

    Before anything else, I would like to apologize for giving you an incorrect screenshot in my last reply. The second screenshot should be this one.

    1571528194zt15 57 02 Screenshot 10

    But, I think you got what I meant since you already applied it to your form.

    Going back to your concern, I just want to make sure that we are on the same page.

    With the condition that you are trying to set up in your form, 

    1571528394zt19 39 25 Screenshot 21

    It will require the "CÓDIGO" field in your form if ALL of the "if rules" you have added in the conditions are met at the same time.

    If one of the "if rules" is not met, then the action will not be triggered.

    Now, the action will just make the "CÓDIGO" field required. It's similar as when you make the field required from its properties.

    How-to-Make-a-Field-Required-Based-on-User-s-Answer

    This means that the form cannot be submitted without filling up the field. As long as the required field is filled, the form can be submitted.

    Setting up the condition will not prevent your respondents to enter the characters you do not want them to enter in the field nor prevent submission. Also, it will not show a different error message for each rule that is not met in the condition

    Just to be sure, can you please clarify what exactly would you like to happen with the "CÓDIGO" field in your form, please?

    We will wait for your response.

  • PrudenceFest
    Replied on October 20, 2019 at 3:42 PM

    Hey Mike,


    Yes, what I wanted is to prevent respondents to fill the field with characters that doesn't exist in our list of CODES. (we have a list with 2k codes that starts with D or S and it ends with A, B or C... the characters between the letters are only numbers)


    So the CODIGO field is where respondent will place their CODE from the item that they purchased. Thats why this field should accept only unique codes that matches with the ones in our list.


    If someone place a code that doesn't match the rules, the field shouldn't accept, like when we type something wrong and a message show up, ex: "something went wrong, this code doesn't exist".


    So, this is not possible?


    Thank you once again!

  • jonathan
    Replied on October 20, 2019 at 5:09 PM

    After doing multiple test using varying condition rules, it seems it the Conditions script is not dynamic enough to get the logic to work.

    An alternative workaround which I found that work is using the Spreadsheet to Form widget.

    I made a demo form you can test here https://www.jotform.com/92926600519965

    You can use the following Codigo codes to test

    1571605410zzz 2019 10 21 05 Screenshot 20


    S12345A

    S12345B

    S12345C

    D12345A

    D12345B

    D12345C


    Let us know if this will not work for you.


    Query related to certain conditions on my form Image 1 Screenshot 31






  • jonathan
    Replied on October 20, 2019 at 5:10 PM

    You may check also our user guide : How to Use the Spreadsheet to Form Widget


  • PrudenceFest
    Replied on October 21, 2019 at 12:34 PM

    Hey jonathan, thank you for your suggestion!

    This might help us better. :)

    I'll make a test.

    My best regards!

  • PrudenceFest
    Replied on October 22, 2019 at 11:08 AM

    Hey jonathan,

    I made the test. It worked fine, but, theres a problem... is there a way to avoid different people to fill with the same codes? I mean that because the option to accept only Unique Answer isn't available for the widget. And this is very important to us.

    How does we make this available? Thank you!
  • David JotForm Support Manager
    Replied on October 22, 2019 at 12:19 PM

    Your new question will be addressed in a separate forum thread: https://www.jotform.com/answers/2010277