-
PrudenceFestЗададен на 18 октомври 2019 г. в 1:57
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.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Отговорено на 18 октомври 2019 г. в 3:58
The first issue is that you have ALL in condition, meaning all have to be true in order to unrequire that field:
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:
The same applies for your "doesn not contain" conditions:
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Отговорено на 18 октомври 2019 г. в 14:33
Oh thank you! I'll test again. and see if it works.
I appreciate the help! -
PrudenceFestОтговорено на 18 октомври 2019 г. в 15:29
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Отговорено на 18 октомври 2019 г. в 16:00
I have checked your form. To fix the issue, please try setting the condition's ANY-ALL to "ALL".
Also, you can just separate each value with a comma (please refer to the image below) and it should work the same.
-
PrudenceFestОтговорено на 19 октомври 2019 г. в 19:13
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Отговорено на 19 октомври 2019 г. в 19:53
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.
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,
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Отговорено на 20 октомври 2019 г. в 15:42
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Отговорено на 20 октомври 2019 г. в 17:09
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
S12345A
S12345B
S12345C
D12345A
D12345B
D12345C
Let us know if this will not work for you.
-
jonathanОтговорено на 20 октомври 2019 г. в 17:10
You may check also our user guide : How to Use the Spreadsheet to Form Widget
-
PrudenceFestОтговорено на 21 октомври 2019 г. в 12:34
Hey jonathan, thank you for your suggestion!
This might help us better. :)
I'll make a test.
My best regards! -
PrudenceFestОтговорено на 22 октомври 2019 г. в 11:08
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Отговорено на 22 октомври 2019 г. в 12:19
Your new question will be addressed in a separate forum thread: https://www.jotform.com/answers/2010277