I have a question - I have a Formblock and I add Tabs (Tab1, Tab2)
Both have 3 fields that are required. (Length, Width, Height)
Only 1 submit button.
But if Tab1 is filled out, I want the form to be submitted
It doesn’t get submitted because in the Tab 2 there are REQUIRED fields that haven’t been filled out.
How can I avoid this error? In both instances the fields are required. So the solutions isn’t making them all “not required”.
All topics regarding this are very outdated.
Thanks in advance.
Hi pietro - thanks for your response.
How would the code be in order to disable the required fields on tab change?
you have to write it tailored for your project, doubt there is a copy and paste ready for that
Hey George, I’m not clear on what behavior your after, and you didn’t share a link so I’m not sure how the Carton tab is different in your fields.
I’m going to guess that you’re trying to submit the form with ONLY information from one of those two tabs filled in- either cartons, or pallets.
If that’s right, tabs is probably not the right choice, because a user can fill in both.
Most likely, that should be a dropdown select, or a radio button, to give those 2 options- and then you’d use script to hide/show the next section, which would be the details of that option Carton or Pallets.
That same script can change the required state of those fields, if needed.
But if you want to save yourself a bunch of work and scripting, you might consider using a drop in form from a provider like JotForm, which makes these kinds of multi-step forms easy.