JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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 uncheck a checkbox from the prepopulated URL?Asked by mediatask on September 28, 2016 at 12:10 PM
I found this post while looking for a solution to a connected problem.
It's actually directly connected to what Ben wrote avove:
Similar is with the false or 0 - making sure that the checkbox is not selected (in case you set it in your form as selected by default for example).
What if I want to use a prefill URL and uncheck a checkbox which is selected by default in the form?
Is there a way to do that?
Please allow me some time to check on this and get back to you with relevant information.
Thank you for your patience.
Do you have any news on the subject?
I'm afraid my colleague Kiran is out of the office at the moment, but I have done some tests of my own.
Yes, it is possible to change the default selected checkbox item to become unchecked through URL prepopulation. However, the way to achieve it might appear a bit confusing at first, so lets explain how it all works on an example. For example, here is a demo form:
It has a checkbox field named "Box", and three items - Cat, Dog, and Firefly. The second option (Dog) is selected by default on the form, so by loading the above URL you will see that Dog is already selected:
If we use the browser Developer Tools to examine the options in question, as described on the original thread, we can see that the options can be prepopulated with terms like box3=false for having an empty first option (Cat), or box3=true for selecting the third option (Firefly). Here is the prepopulated URL:
The "trick" for unchecking our second option, Dog, is to pass it an ON (true, 1) command. As this option is already ON by default, another ON (true, 1) will actually turn it OFF. So to turn the Dog option off, we would pass it box3=true, as can be seen on the following prepopulated URL:
Please try performing the same steps to disable the default checkbox item on your form. If you need specific assistance with an exact option of a checkbox field, please let us know which option of which field, and on which form, and we'll be glad to provide you with the exact term to use for its unchecking.