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.
How to add condition to make Hidden field mandatory?Asked by Sandesh on November 20, 2014 at 12:21 AM
We are backfilling a hidden box with some data and at some times the data wont get filled and because of this in further transactions we are facing some issues. This backfilling of data is very intermittent and not happening all teh time and there is no pattern that could be identified. So now we need to make this hidden box as madatory. So is there a way to make this?
We have also tried using a text box inside a section control(with Visibility:Hidden) and filling the text box using backfill and we are using some conditions to set a default value in doing invalidation if data is not filled in text box if backfilling fails. But this is not working some times and we are not able to identify the pattern.
Please help me out getting this Hidden filed as madatory or required and we do set a default value and put an invalidation for this.
I think one more issue with Hidden box is that we cannot compare the data that comes in Hidden box to "IsEmpty" if this comparision works we can go with setting default value and doing invalidation.
I do not think that it is possible to achieve your requirement. It is not possible to make a hidden field as mandatory field as the condition will not trigger for hidden field.
I would suggest you to please explain your requirement on how the data will be filled in the hidden field. Are you going to pre-populate the hidden field through URL parameters?
We will wait for your response.
Data in hidden box is getting filled by backfill condition via ajax call. There are totally 2 hidden boxes and there is dependency on each other.
yes it is possible to achieve your requirement. Instead of using a "Hidden Box" widget, you should use a normal text box field and then hide it manually. This field can then be used in condition to check if it is filled or empty. You can also populate the hidden fields through URL parameters. Please take a look at the following screenshot on how to hide a form field and then add condition as well:
Hope this helps.
Do get back to us if you have any questions.