How to uncheck a checkbox from the prepopulated URL?

  • mediatask
    Asked on September 28, 2016 at 12:10 PM

    Hi Everyone,

    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?

    Jacek

  • Kiran Support Team Lead
    Replied on September 28, 2016 at 12:22 PM

    Please allow me some time to check on this and get back to you with relevant information.

    Thank you for your patience. 

  • mediatask
    Replied on October 3, 2016 at 3:44 AM

    Hi Kiran,

    Do you have any news on the subject?

    Thanks,

    Jacek

  • Boris
    Replied on October 3, 2016 at 5:41 AM

    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:

    https://form.jotform.com/62762589805974

    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:

    How to uncheck a checkbox from the prepopulated URL? Image 1 Screenshot 30

    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[0]=false for having an empty first option (Cat), or box3[2]=true for selecting the third option (Firefly). Here is the prepopulated URL:

    https://form.jotform.com/62762589805974?box3[0]=false&box3[2]=true

    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[1]=true, as can be seen on the following prepopulated URL:

    https://form.jotform.com/62762589805974?box3[1]=true

    How to uncheck a checkbox from the prepopulated URL? Image 2 Screenshot 41

    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.

    Thank you.