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

    Conditional Logic: Ability to disable an option in the "Single Option" field.

    Asked by gesturepoke on May 10, 2017 at 03:47 PM

    I downloaded the source code for one of my forms because I need to add a function that disables only one of the radio inputs when certain conditions are true.

    Under the sections named "Personalized" and "Logo," there are 2 questions that I'm trying to add this feature to. The first is a radio input question asking if the the user wants to add the message/logo, then there are dropdown menus asking about placement (chest or sleeve) followed by another radio question asking if they want it on the left or right side. I want to add a function that disables one of the radio inputs on the logo so the user can't add the logo and the message in the same exact spot.

    I made a test version in jsfiddle here. So I know the code I'm. But for some reason, nothing happens when I add the same setup to the jotform file. I've tried linking the form to a js file, and I've tried typing the script directly inline. Neither one seems to be working.

    I know with CSS I have to use the !important property a lot to get the form to do what I want. Is there some equivalent thing I need to type in jquery?

    Page URL:
    https://form.jotform.us/70865056703155

  • Profile Image
    JotForm Support

    Answered by jonathan on May 10, 2017 at 06:13 PM

    It will help us understand more the problem if you can share to us the URL of your website where you have used the source code of the form.

    Also, I am not sure if you have found already, but there is already an existing condition option in form Conditions that will allow enable/disable of fields base on condition rules.

    What I am saying is, you probably won't have to use the source code to achieve the condition rule needed to enable/disable a field in the form.

    You can use the CSS code to reposition the fields on the form so that when they show/hide or enabled/disabled they will appear on the position you want them on the form.

    We will wait for your updated response.

  • Profile Image

    Answered by gesturepoke on May 10, 2017 at 06:38 PM

    The form will eventually be posted here, but I haven't uploaded it to the site, yet. Right now, I'm testing the form locally - I just open the html file in my browser.

    I know about the enable/disable section under conditions, but I only want to disabled one of the inputs. The condition setting disables both of them - essentially disabling the entire question, and from what I found, there doesn't seem to be a setting to only disable part of it.

  • Profile Image
    JotForm Support

    Answered by jonathan on May 10, 2017 at 10:05 PM

     but I only want to disabled one of the inputs. The condition setting disables both of them - essentially disabling the entire question, 

    Can you describe more how it was suppose to work. Perhaps we can figure out a simpler solution for you within the capability of the Form Builder.

    I see this is your form. If we take a look at the Radio option button you described, the behavior I can say is actually similar to what it was suppose to be.

     

    I want to understand how your idea was suppose to be different from what the Radio option button work.

     

  • Profile Image

    Answered by gesturepoke on May 11, 2017 at 10:59 AM

    I want to prevent people from selecting the same placement (dropdown menu) and side (left/right radio buttons) for both the personalization and logo sections. So what I want is:

    - If the questions "Would you like to personalize your lab coat(s)?" and "Add line underneath logo?" are both marked "Yes"

    - The Personalization "Placement" dropdown menu is marked "Chest" and the radio field next to it is marked "Left"

    - And the Logo "Placement" dropdown is marked "Chest"

    - Then, the radio field next to the Logo's "Placement" should have "Left" disabled and "Right" selected.

    The condition in jotform would disabled both "Left" and "Right," which is not what I want. I only want to disable one of the 2 inputs, and there's no way to pick only one of them.

    The jsfiddle I linked to is a stripped down version of what I'm trying to do. In that fiddle, you can't pick the same exact choices for both boxes.

  • Profile Image
    JotForm Support

    Answered by Kevin_G on May 11, 2017 at 12:31 PM

    Thank you for the additional details. 

    Unfortunately, that is not possible to achieve on JotForm, you can only disable the entire field and there is not a way to disable one option only, you could need to split your current radio buttons so conditions recognize them as different options. 

    If you want we could open a feature request for this, do note that we cannot provide an ETA or ensure this will be developed, but we would let you know as soon as we receive any update about it. 

    Let us know. 

  • Profile Image

    Answered by gesturepoke on May 11, 2017 at 01:00 PM

    Yeah, I figured it wasn't possible to do from within Jotform. The issue I'm really concerned about is that it's not working even after downloading the source code and using my own script. Will it not work even if I download the files and add code to it?

    I would like to put in a feature request even if it doesn't happen for a while.

  • Profile Image
    JotForm Support

    Answered by Kevin_G on May 11, 2017 at 01:36 PM

    Yes, if you download the source code of your form it should work, make sure you're using the correct field's IDs or classes, make also sure that the code you are adding to your form does not conflict with the scripts the form uses, this may be why you cannot see it working. 

    I also forward this to our second level as feature request, we will let you know as soon as we get updates about it. 

  • Profile Image

    Answered by stormingrobots on May 17, 2017 at 08:43 AM

    to gesturepoke.   It is rather easy to do in dropdown :

    <option value="choice2" disabled>2nd choice in my dropdown</option>

    Hope this will be added feature into Jotform, as this is a rather common practice to selective disabled options in a dropdown menu.

  • Profile Image
    JotForm Support

    Answered by Rose on May 17, 2017 at 09:01 AM

    We have forwarded your feature request to our developers. We unfortunately cannot give you any estimates regarding when or if this might get implemented, but as soon as such a feature becomes available, we will make sure to let you know through this support thread.