What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Why will the show/hide field NOT work with a required condition field?Asked by michelleziadie on August 25, 2014 at 06:17 PM
I have another question as well, why will the show/hide field work with a required field?
I want if someone has 3 children, then 3 child registrations show up, and certain fields in all 3 child registrations are required. I can't figure out how to make that work.
Did you mean that you are trying to make the conditions work with the required field such as with the example you've provided above? Or?
The required fields should accept that. Is this on the same form that you are having that problem with?
Thank you for your answer. Let me explain better:
If someone chooses 3 children/or students (as "how many children are you registering"), then I want:
child/student 3 'name' to be required
child/student 3 'grade entering' to be required
child/student 3 'dues total' to be required
However, I don't want child/student 3 to have any required fields if someone didn't choose to register child/student 3..
Does that help clarify?
Yes thank and I do apologize about the previous confusion I had with it.
I think what you are looking for is a field that affects another field base your questions via a physical requirementinstead of marking the field as required.
An example would be something along the lines of "Would you like to add another child to your list?"
In my demo form you'll notice that I have created a " requirement condition " which marks these fields as required only if the dropdown has children added to it. If none are selected then nothing happens and there is no requirement.
Sorry about that, I found a mistake I made with the example requirement and fixed it. I've set it so that the requirement now shows for no children if none are selected or alternatively it will now require the same amount of children chosen such as if 3 children then 3 names are required.
Here's the new conditions -
This is still not working.
I have a condition set that says IF "how many children are you registering" is equal to "3"
then SHOW "student name", "student birthday" etc. this is working fine.
HOWEVER, I also have a condition set that says IF "how many children are you registering" is equal to "3"
then REQUIRE "student name", "student birthday" etc. THIS IS NOT WORKING.
NOR is my additional REQUIRED condition that says "IF "student 1" is "is entering PRE K"
then REQUIRE "Student 1 Pre K Dues"
This goes on for Student 1 -through all the grades.
Then repeats for Student 2, then Student 3, Then Student 4.
Can you look and see where there is a conditions conflict on my form please!
Please allow me a little bit of time to investigate this matter deeper. As soon as I figure out something more involving this problem I will update you as soon as possible.
Hi KadeJM. Can you advise if you have found anything that will fix this issue?
I have also checked this. And I think the issue could be only due to priority order of the conditions.
For example, conditions that makes the fields *Required should be after the target fields are already visible on the form (example for 3 students).
So all fields
child/student 3 'name'
child/student 3 'grade entering'
child/student 3 'dues total'
must be seen first before the make *Required Field action should be triggered.
This is only an initial assumption. I will try and check this on a clone of your form.
I'll get back to you on the results.
Please try my test form http://www.jotform.me/form/42381607999469
I modified the Required conditions to use the multiple-action option
and I drag the Required condition at the near bottom of the priority
It seems to be working already when I test
Please try the same modification on your form. See if it makes the difference.
Inform us if still not working.
HI...I have moved the show /hide fields and the required fields as you said, however:
-all students are showing no matter how many 'students are entering Rockenbaugh this year'
-the required fields for student 2,3,4 are still not showing as required when registering 2, 3 or 4 children.
You have my permission to go into my actual form and modify the location of the conditions. No matter how I order them, it doesn't seem to work correctly.
I appreciate your help!
I think the problem here is happening because of the sheer amount of conditions being used which is leading to this issue.
This is often a known issue to happen when there are lots of conditions being used and it may be best to clone it and rebuild it testing each on the clone after each implemented rule to troubleshoot further otherwise it is going to continue to be very difficult and I know that's something that can be a bit unfortunate to do.
Based on my colleagues last response I think that wasn't working with your children thus showing all because he was attempting to try to resolve the requirement issue first.
When I inspected your form furthermore I found that you have some contradicting conditions which were conflicting and causing this to show either way.
An example of this for the child selector would be with your condition as seen below you have this set only to display one regardless if any even though there are 4 levels to go on so this has caused your problem to carry on.
We will try to attempt this further.
So what is the correct set up of the condition to make the children show/hide as they should?
I was attempting to correct this earlier for awhile now, but unfortunately as I stated above there's so many conditions that I am convinced it will be a problem trying to fix it that way.
What I've done is made a copy of your form to work with this on and removed the existing conditions so that I can try to rebuild it per your request.
I discovered that the main problem is happening because you have your data hidden under a collapse so your conditions to show/hide needs to target those at first.
IE - " Student 1, Student 2, Student 3, Student 4 " and the fields under those will be included.
Take a look at this rebuild I started for the moment -
You will now notice that the Children equals 1,2,3,4 are working now.
I will be working on implementing the requirements next though which I think that should work for that now once reapplied.
HI again Kade!
I tested out the new form, if it's the beginning of the conditions, then yes, I see how it's working right!
Will you be making the new form complete?
I don't know how to implement the changes, unless I have instructions on how to complete the conditions/and requirements on the new form.
thank you for your help!
That's what my goal is because I was running into too many issues with the original set of conditions you had. You are more than welcome to "clone it back" and try it further on your end if you wish since it's technically your form.
Also, Thank you for your confirmation about that with it working. It is my intention to resolve that issue first then move into fixing any other parts that might be necessary.
Here's an example of how I had set up those first four questions that were working now to make them work correctly just so you can understand it better without any confusion.
For your original conditions show/hide for that question regarding how many children would be registered I had changed its setup to the following:
Then what I applied after that was another rule to hide it if none were selected yet.
After attempting to do this the first time with the rest of your conditions it hadn't been working because there was an unexpected conflict. And although I had gone through your conditions prior to attempting to rebuild it I wasn't finding the cause.
However, that's the proof in the pudding that it is working since after rebuilding just those that this was working.
Is there progress on this re-build?
No updates yet. We'll review this and update this thread once done.
Sorry for the late response. I've made a cloned version of your form and modified some of the conditions. While reviewing your your requirement I just want to confirm if this is how you want the conditions to work.
If How many students will you be registering at Rockenbaugh for the 2014-2015 school year? is = 1
Show Student 1
Student 1 Name,
Student 1 Birthdate,
Student 1 is entering,
Student 1 | Class t shirts are worn throughout the school year for all field trips, special events, May Madness and misc other events,
Does Student 1 have any food allergies?
If How many students will you be registering at Rockenbaugh for the 2014-2015 school year? is = 2
Show Student 1 and Student 2
Student 2 Name,
Student 2 Birthdate,
Student 2 is entering,
Student 2 | Class t shirts are worn throughout the school year for all field trips, special events, May Madness and misc other events,
Does Student 2 have any food allergies?
If How many students will you be registering at Rockenbaugh for the 2014-2015 school year? is = 3
Show Student 1 and Student 2 and Student 3
Student 3 Name,
Student 3 Birthdate,
Student 3 is entering,
Student 3 | Class t shirts are worn throughout the school year for all field trips, special events, May Madness and misc other events,
Does Student 3 have any food allergies?
If How many students will you be registering at Rockenbaugh for the 2014-2015 school year? is = 4
Show Student 1 and Student 2 and Student 3 and Student 4
Student 4 Name,
Student 4 Birthdate,
Student 4 is entering,
Student 4 | Class t shirts are worn throughout the school year for all field trips, special events, May Madness and misc other events,
Does Student 4 have any food allergies?
If Student 1 is entering "Pre K": Require "Student 1 | Pre K Dues". Same goes with Student 2,3 and 4?
Then Require this:
Yes, This is looking correct! However, Can you confirm that when a parent is registering 4 students
that the student information for ALL students being registered (1,2,3 AND 4) is required?
This is how you can fix the Students selection on your form:
1) Remove the required conditions attached to your How many students field.
2) Set all required student fields to the Required mode instead of using required conditions.
This way, the Student 1,2,3,4 options will work properly. The required validation does not affect hidden fields, so that it will work fine for conditional fields.
One more thing, your form is slow due to enabled 'Save on data changes' option under form Autofill settings. You might want to increase an 'Auto Save' time, and disable the 'Save on data changes' option.
THANK YOU Mike T!
This is the simplest, most straightforward answer I have received!
I tested it out on a clone of my form and it worked perfect!!!
Thank you again!!!
On behalf of my colleague, you are welcome.
Do get back to us if you have any questions.