How to Have Sub-Category or Sub-Labels on an Order Form

  • Profile Image
    PTI
    Asked on November 10, 2012 at 02:54 AM

    This is nice! Is there any way to get the same thing, but with radio buttons? We have different, mutually exclusive options with different prices. For example, if we were selling cars, we would want to be able to offer choice of transmission (standard or automatic, but not both) and then choice of tires (high performance or ordinary, but not both).



    This is a re-post of a comment on How to Have Sub-Category or Sub-Labels on an Order Form

  • Profile Image
    NeilVicente
    Answered on November 10, 2012 at 03:19 AM

    That is not natively supported on JotForm builder. However, we may be able to provide a custom solution, granted that the form's source codes will be embedded on a page hosted on your own site.

    Let me know if you'd like to proceed and we'll come up with an example (and perhaps, instructions).

  • Profile Image
    abajan
    Answered on November 10, 2012 at 10:29 AM

    @PTI

    I've been experimenting with some JavaScript and came up with this demo. To make your own form work like that, embed its source as explained in the link to which my colleague referred and place the script anywhere after the form's code, preferrably just before the closing body tag of the page, just like in the demo.

    In my quest for an answer, I came across more eloquent solutions (notwithstanding that they failed to pass muster at JSHint!) but I wasn't sure how easy they would be to implement in your form's case, knowing that it had a single checkbox field with two sections instead of two separate fields.

    Incidentally, even though the checkboxes are styled to look like radio buttons (not in all browsers though), they don't function exactly like actual radio buttons: Normally, once a radio button is selected, it can't be de-selected unless the page containing it is refreshed.

    Please let us know if you need further assistance with this.

  • Profile Image
    PTI
    Answered on November 12, 2012 at 01:49 PM

    That's brilliant, abajan! Thanks so much.