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.


  • Profile Image

    Is there a way to have subgrouping in a check box group

    Asked by pvbautista on May 13, 2012 at 10:18 AM

    Label 1

       checkbox1

       checkbox2

       checkbox3

    Label 2

      checkbox 4

      checbox 5

     

    So you can apply a "required:on" for the checkbox group. the above is only one checkbox group but with different labels per group?

  • Profile Image
    JotForm Support

    Answered by abajan on May 13, 2012 at 11:57 AM

    Would the arrangement of checkboxes in the form pictured below be suitable for your requirements?

    (Click image to use live form)


    Those are actually two checkbox fields but CSS was injected to make them appear as one. (The heading is actually a seperate free text element.)

  • Profile Image

    Answered by pvbautista on May 13, 2012 at 01:30 PM

    Thanks for the reply. What I was trying to do, is to have some sort of data validation, only one of the checkboxes needs to be checked. If I set "required" to on for each of the two checkboxes fields, then at least two of the checkboxes needs to be checked. I think what I'm trying to do right now is impossible. But if it is possible, then that would be great!

  • Profile Image
    JotForm Support

    Answered by abajan on May 13, 2012 at 01:48 PM

    If by "...only one of the checkboxes needs to be checked" you mean that only one should be checked (as opposed to at least one must be checked but more than one may be), both fields should be replaced with radio button fields.

    Unfortunately, there's no button in the form builder to toggle field types between radio button and check box. So, the two fields would have to be deleted and replaced. That means their IDs will be different to the current fields, necessitating some changes to the form's injected CSS.

  • Profile Image

    Answered by pvbautista on May 13, 2012 at 02:15 PM

    Thanks for the reply,again! What I meant was at least one of the check boxes needs to be checked. You're right about radio buttons, but I know what they are for and that's not what I need. 

    "at least one must be checked but more than one may be" <-- this is what I need to do :-)

  • Profile Image

    Answered by pvbautista on May 13, 2012 at 02:19 PM

    to further clarify, given your nice example form, if I check only option 1 under label 1, I should be ok. If I check only option 1 under label 2, I should be able to submit the form as well. If i don't put a check on any box, that will trigger the validation :-). 

  • Profile Image
    JotForm Support

    Answered by abajan on May 13, 2012 at 02:37 PM

    Short of embedding the full source of the form into a web page and adding JavaScript to perform the required validation (I've seen such a solution on this forum but finding the thread could be tricky), there just might be a way to do this by employing the use of four check box fields and conditions.

    I'll try to have a working example for you later today. Of course, in the interim, one of my colleagues may well have a simple solution to this puzzle.